Scraping Vocabulary from the Memrise Course
Project description
Features:
- Support scraping the courses in MEM to take the vocabulary
Appplication Requires
Install DB Browser : SQLite
Install Library:
Window
python -m pip install memrise
Linux
pip install memrise
macOS
sudo pip3 install memrise
Guidelines
How to take Course ID?
Access the Website: Memrise and copy the Course ID as the following picture:
Import library and initialize database
from memrise import Course,Database
#Create file database output
db = Database('English.sqlite') #Other format is .db
#Connect to file database and init
db.connect()
db.init()
The output will give you the List Language's ID of the Course, remember the ID for next step.
Language IDs:
1. English UK
2. English US
3. Chinese
4. Janpanese
5. French
6. Spanish Mexico
7. Italian
8. German
9. Russian
10. Dutch
11. Korean
12. Arabic
13. Spanish Spain
Scraping course with ID
Regarding to Module Course with two paramemters:
CourseID
: Get the Course ID as aboveLanguageID
: The Language ID of the Course which you study.
The following example is scraping the English course for Vietnamese with IPA of English US, so the Language ID is 2.
from memrise import Course, Data
#Create file database output
db = Data('English.sqlite') #Other format is .db
#Connect to file database and init
db.init_database()
#Connect the course to scraping info this maybe take a few momment.
course = Course(1658724,2)
#Update information about the course
db.update_course(course)
Update course with your language meaning (NOT WORKING NOW)
This function will be fixed in next release
Use the method update_db_en()
if the LANGUAGE COURSE is English for scraping IPA.
Use the method update_db()
if the Language Course is the others.
About the parameters of two above methods are the same:
CourseID
: the ID of the courseLanguage
: your mother language with format 'en', 'fr', 'ko', 'vi'...
#If your Course is English language use `update_db_en()`, otherwise use `update_db()` method.
db.update_db_en(1658724,'fr')
Check the output with SQLite
File output
Show the words table as the following steps: Browse Data > Table > Word
If you want to choose the raw meaning, you could run the following SQL statement.
SELECT word, sub, IPA FROM words
Steps : Execute SQL > Typing SQL Statements > Run
Github: https://github.com/tquangsdh20/memrise
Log changes:
v1.0.0: Implementation Scrapping Vocabulary
v1.1.0: Update IPA Function
v1.2.0rc1 : Release check for fixing ERROR IPA and update new TRANSLATE FUNCTION
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for memrise-1.2.0rc1-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3e7d4bf62cf6029189bb5b2c10645999a6435e65537055057c5f12277b9a47e4 |
|
MD5 | 0d09c41c3d169ddab7b66870d0feea43 |
|
BLAKE2b-256 | b2208f1412381a3a29278c782aeee74f5c4ba38f3142b0c8f0a08fdf4c0f27a2 |