forked from KaKi87/deepl-scraper
Update glossary support #1
1 changed files with 2 additions and 2 deletions
4
index.js
4
index.js
|
|
@ -96,7 +96,7 @@ module.exports = {
|
|||
setGlossary: async (glossary, sourceLanguage, targetLanguage) => {
|
||||
sourceLanguage = sourceLanguage.toUpperCase();
|
||||
targetLanguage = targetLanguage.toUpperCase();
|
||||
|
||||
|
||||
const
|
||||
langSelect = `.lmt__glossary_newEntry_langButton`,
|
||||
sourceGlossaryInput = `.lmt__glossary_newEntry_inputSource`,
|
||||
|
|
@ -125,7 +125,7 @@ module.exports = {
|
|||
throw new Error('UNSUPPORTED_GLOSSARY_LANGUAGE');
|
||||
}
|
||||
await page.waitForSelector(sourceGlossaryInput, { visible: true });
|
||||
|
||||
|
||||
const words = Object.keys(glossary);
|
||||
for (let word of words) {
|
||||
await page.type(sourceGlossaryInput, word);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue