Add glossary methods #4

Open
KaKi87 wants to merge 15 commits from Androz2091/deepl-scraper:glossary-v2 into master
Showing only changes of commit f2cafe0b99 - Show all commits

View file

@ -82,7 +82,7 @@ module.exports = {
await page.waitForSelector('.lmt--active_translation_request');
await page.waitForSelector('.lmt--active_translation_request', { hidden: true });
_res.target.translation = await page.$eval(targetSentenceField, el => el.value);
page.close().catch(() => {});
await page.close();
return _res;
},
clearGlossary: async () => {
@ -132,7 +132,7 @@ module.exports = {
await page.type(targetGlossaryInput, glossary[word]);
await page.click(glossaryAddButton);
}
page.close().catch(() => {});
await page.close();
},
quit: async () => {
if(browser)