Add glossary methods #4

Open
KaKi87 wants to merge 15 commits from Androz2091/deepl-scraper:glossary-v2 into master
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