From 32866a2131cdb3da077034a2081b7d312c05dd60 Mon Sep 17 00:00:00 2001 From: dessant Date: Wed, 11 Dec 2024 19:12:23 +0200 Subject: [PATCH] fix: update Freepik --- src/engines/freepik.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/engines/freepik.js b/src/engines/freepik.js index 0256cf9..b146c5e 100644 --- a/src/engines/freepik.js +++ b/src/engines/freepik.js @@ -4,16 +4,16 @@ import {setFileInputData, initSearch, sendReceipt} from 'utils/engines'; const engine = 'freepik'; async function search({session, search, image, storageIds}) { - (await findNode('div[data-modal="search-by-image"]')).click(); + (await findNode('form > div > button[data-state="closed"]')).click(); - const inputSelector = 'input#form-search-by-image--file'; + const inputSelector = 'input[type=file]'; const input = await findNode(inputSelector); await setFileInputData(inputSelector, input, image); await sendReceipt(storageIds); - input.dispatchEvent(new Event('change')); + input.dispatchEvent(new Event('change', {bubbles: true})); } function init() {