Skip to main content

Scraping the 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, Data
#Create file database output
db = Data('English.sqlite') #Other format is .db
#Connect to file database and init
db.init_database()

Scraping course with ID

Regarding to Module Course with two paramemters:

  • CourseID: Get the Course ID as above
  • LanguageID: The Language ID of the Course which you study.

Where, the LanguageID is define as the followings: 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

The following example is scraping the English course for Vietnamese with IPA of English US, so the Language ID is 2.

#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

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 course
  • Language : 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.0 : Update new TRANSLATE FUNCTION

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

memrise-1.2.0rc4.tar.gz (18.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

memrise-1.2.0rc4-py3-none-any.whl (20.4 kB view details)

Uploaded Python 3

File details

Details for the file memrise-1.2.0rc4.tar.gz.

File metadata

  • Download URL: memrise-1.2.0rc4.tar.gz
  • Upload date:
  • Size: 18.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.11 CPython/3.7.8 Windows/10

File hashes

Hashes for memrise-1.2.0rc4.tar.gz
Algorithm Hash digest
SHA256 40bcd74f334899e0a8d43a4fa90e5f571778d379f2c873ccba0b0b45b105f966
MD5 7f8706d7b98960d0a4b92a10ab4d09d6
BLAKE2b-256 8b6bdc25a7ba7993ca7bf0057ee2ef30435d28e3629f8d2ca17f2b7f6184ba16

See more details on using hashes here.

File details

Details for the file memrise-1.2.0rc4-py3-none-any.whl.

File metadata

  • Download URL: memrise-1.2.0rc4-py3-none-any.whl
  • Upload date:
  • Size: 20.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.11 CPython/3.7.8 Windows/10

File hashes

Hashes for memrise-1.2.0rc4-py3-none-any.whl
Algorithm Hash digest
SHA256 a94e3788ed706698d9f052d371c6bd792fde0b8b1f1536c571b202b96b2babc7
MD5 66b750905669f14419438658f84157c9
BLAKE2b-256 3a4b698fbc521fe065074e8d9609e0cb4ab06f92c5984480c29eca3a65400cf4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page