nad2000 / memrise-scraper

simple memrise scraper
MIT License
25 stars 5 forks source link

Basic Scraping - Beginner Python #5

Open kuriimutaiyaki opened 5 years ago

kuriimutaiyaki commented 5 years ago

Hello,

I am new to python and I'm having trouble understanding how to retrieve data from Memrise Courses.

I have completed the pip installation pip install Memrise-Scraper on Windows.

I would like to scrape the following course

/course/24172/jlpt-n3-vocab-with-audio/1/

I am not sure how to proceed from:

py -3 memrise.py /course/24172/jlpt-n3-vocab-with-audio/1/ >output.csv

Thank you

tech189 commented 5 years ago

Hello, If the command succeeds, then you will find the data in the ouput.csv file. If the command fails, then output.csv will be empty.

To check your copy of the scraper works, try py -3 memrise.py and it should print out the data from https://www.memrise.com/course/977288/korean-grammar-in-use-11/

If you can't get it working from that then you can always be lazy and use my web version ;)

nad2000 commented 5 years ago

@kuriimutaiyaki, I managed to get it working on Windows (it had never been tested on it):

AppData\Local\Programs\Python\Python37\python.exe -m pip install -v --user memrise-scraper
REM That created also 2 executables for running the scripts:
AppData\Roaming\Python\Python37\Scripts\memrise.exe https://www.memrise.com/course/24172/jlpt-n3-vocab-with-audio/1/
OR:
AppData\Roaming\Python\Python37\Scripts\memrise2tts.exe https://www.memrise.com/course/24172/jlpt-n3-vocab-with-audio/1/

In my case, I had installed python locally in my user directory. In your case, memrise2tts.exe and memrise.exe might be located somewhere else...

memrise.py is a module that since it is now a package module cannot be invoked directly.

kuriimutaiyaki commented 5 years ago

@tech189 Thank you for sharing your tool, it is quite amazing!

@nad2000 I was successful in retrieving the data through the Anaconda Prompt. I would like to know if it's possible to achieve the same results through the Jupyter Notebook.

Your time and efforts are greatly appreciated.