This project scrapes the Italian words (& any other languages available on Duolingo) from the Duome website (https://duome.eu/vocabulary/en/it) using Playwright, then it downloads phonetics from GoogleTextToSpeech (gTTS) & creates Anki flashcards.
DuomeScraperVideo.mp4
How to run
- Download
main.py
&requirements.txt
and put them inside a folder - Create a virtual environment:
python -m venv VEnv
- Activate virtual environment:
- ๐ช Windows CMD:
VEnv\Scripts\activate
- ๐ง Linux:
source VEnv/bin/activate
- ๐ช Windows CMD:
- Install dependencies:
pip install -r requirements.txt
- Install playwright (
โ ๏ธ code uses Microsoft Edge browser, you can change that to chromium if you don't want to downloadmsedge
):playwright install && playwright install msedge
- Read the code, you may need to personalize some variables, then run the
main.py
& wait to get the final.apkg
file -
Open Anki application...
On Android: From top-right, click on โฎ and select Import โก๏ธ Deck package (.apkg)
On Desktop: File โก๏ธ Import... โก๏ธ Choose .apkg file
- If all word elements didn't load all at once, we should scroll down to retrieve all the words. However, this feature has not been implemented yet, as the website displays all words at once (all necessary elements are visible after load).
- Some languages, like German, don't have definitions. When accessing the definition element, an exception may be raised.