Skip to main content

Scaping MEM course infomation

Project description

Library Scraping Vocabulary Languages

Features:

  • Support scraping the courses in MEM to take the vocabulary
  • Support scraping IPA of English Language (US and UK)
  • Support translate to your mother language

Appplication Requires

Install SQLite3 : SQLite

Install Library:

Window

 python -m pip install memrise

Linux

pip install memrise

macOS

sudo pip3 install mateco

Guidelines

How to take Course ID?

Access the Website: Memrise and copy the Course ID as the following picture:

CourseID

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()

Scraping course with ID

#Connect the course to scraping info this maybe take a few momment.
course = Course(1658724,2)
#Update information about the course
course.update(db)
#Get all levels in course & scraping all levels information
levels = course.get_levels()
for level in levels:
    level.update(db)

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

OUTPUT

Show the words table as the following steps: Browse Data > Table > Word

OUTPUT1

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

OUTPUT2

Github

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.1.0.tar.gz (88.9 kB view hashes)

Uploaded Source

Built Distribution

memrise-1.1.0-py3-none-any.whl (87.7 kB view hashes)

Uploaded Python 3

Supported by

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