Update glossary support #1

Merged
Androz2091 merged 9 commits from KaKi87/deepl-scraper:glossary-v2 into glossary-v2 2021-03-18 17:13:53 +01:00
Showing only changes of commit 6f83ae43fb - Show all commits

View file

@ -34,6 +34,7 @@ const {
translate,
getSupportedLanguages,
setGlossary,
clearGlossary,
getSupportedGlossaryLanguages,
quit
} = require('deepl-scraper');
@ -111,7 +112,10 @@ await setGlossary({
}, 'en', 'fr');
```
Note: at this time, the only way to reset the glossary is to quit the browser.
Glossary is cleared when you quit the browser, although it can be cleared earlier using the following method :
```js
await clearGlossary();
```
As glossary doesn't support all translation-supported languages, you can get the list using the following method :
```js