I am trying your script. And to do that, I followed the following steps, which all worked well, until the running of the script.
- Download Python 3 from https://www.python.org/downloads/ and install it.
Version v3.6.1 is the latest (as of April 3, 2017) and is 29 MB. (less than 5 min)
- Download the script from https://github.com/DrewSSP/bulk-audio-upload using either step 2a or 2b (less than 1 min).
2a. Using the ‘Clone or Download’ button, which offers the option ‘Download ZIP’. Extract the ZIP, to place of your choice. For example 'Downloads\bulk-audio-upload-master)
2.b You can also just download the individual files: ) and place in a directory of your choice.
- Open a command prompt: Start -> Run -> cmd (Win7) or Right-click Start -> Comand promopt (Win10)
- Change to the directory where you placed the files,
e.g. >cd C:\Users\my-user\Downloads\bulk-audio-upload-master
- Create a cookie file with the name 'variables.py’
e.g. >notepad .\variables.py
As a preperation, type (or copy-paste) the following:
cookies = {‘name1’:‘value1’,‘name2’:‘value2’
}
- Now you need to find the cookies. This is perhaps to more difficult part.
Using the Chrome browser as an example (not sure exactly how to do on other browsers): (15-30 min)
6a. Login to Memrise
6b. Menu (the three dots) -> More Tools -> Developers Tools (CTRL-SHIFT-I). A window will appear at the bottom of the screen. If that window is too small it can be resized by clicking exactly on the border (a two-point arrow will appear) and dragging it up (of left).
6c. In that new view click the ‘Application’ tab, open Cookies in the left hand pane and select ‘memrise.com’. You need to format them as shown in the example below.
If you know how to format, you can skip the next steps and follow your own method. Otherwise, follow these steps to format the cookies:
6d. To copy the values double click on the name, then right-click and choose 'Copy'.
6e. Paste onto the spot where it says 'name1' in the text file (variables.py). Before and after the name should be a single quote (').
6f. Double click the value, right-click and again choose 'Copy'.
6g. Again paste into the text file, but now on the spot 'value1'. Again, before and after the value should be a single quote (').
6h. Do the the same for all the cookies.
* There should always be a colon (:) between the name and the value.
* There should be a comma (,) between each two cookies.
* After the last cookie there should be an closing accolate (}).
6i. After you have done all the cookies, save the file.
Example of the cookies file:
cookies = {'_sp_id.7bc7': '06d67edb75b999999.1466999953.100.1555544393.1234573782',
'_sp_ses.7bc7': '*',
'csrftoken': 'nxIto89I10jvMe45lt5xBJ8xnQkWayh3',
'fbm_143688012353890': 'base_domain=.www.memrise.com',
'fbsr_143688012353890': 'bGMeJtlEkaCEISsa4th4J1-FvygfuhFgBuu7qnnS1M.eyJhbGdvcml03f6OiJITUFDLVNIQTI1NiIsImNvZGUiOiJBUUNxNTh6ekpDMDlpNGNpTjNyaVRYR3VEN0xHZHM1TEJyMmFCVlJBTmVHeVl4WFlWanM1QVRpMDBtSzFwMWNFV2dxa28wUUxrWUVoT0RKLVdQOG1DdHVncjZhSGdxMVBEaEp3MGhTbV9pRXA3ckcxZU02d2M0LTNubFFCVkVaU0tUVml3eXFKdy1FZmxJYTVuZGJZUlhBXzVlNXdGcFFKWWVJem83ZllwcV9COWExdkJ0S3ZFQlB6OGQ2c2w0azMyOWtxcmFyVjJRYXpodVh3WXVlbVc4ejNlUUc5TE11SXJsakxTbW1hOXN3cUREVzEtcl94WlNLRlRucklsV3FxY3kzN0g1UnFVeTRwOFZ0TVVSXzEzd0Z0TjBrNF9PZjgzalJHYVZjZkV5dWFqUDJLQVhSRkxmT3RrU0R5d3lRSnRncGRMVC1ZZTVRTkNKN0xNRWxfcEVVWSIsImlzc3VlZF9hdCI6MTQ2ODY0Mzk4MiwidXNlcl9pZCI6IjUwMzc3MTY3OCJ9',
'i18next': 'en',
'sessionid': 'xrxg3zofonxnfmf5gfdgv5444defa71'}
7. Run the script.
This step 7 didn’t work for me!
I first tried this way:
"\program files (x86)\Python36-32\python" main.py https://www.memrise.com/course/1441234/my-words-for-language-learning/edit/database/9876543/
Traceback (most recent call last):
File "main.py", line 1, in <module>
import requests, tempfile, sys
ModuleNotFoundError: No module named 'requests'
2nd time:
cd "C:\Program Files (x86)\Python36-32"
python "C:\Users\my-user\Downloads\bulk-audio-upload-master\main.py" https://www.memrise.com/course/1441234/my-words-for-language-learning/edit/database/9876543
Traceback (most recent call last):
File "main.py", line 1, in <module>
import requests, tempfile, sys
ModuleNotFoundError: No module named 'requests'
I also tried to run the script ‘google’ in the folder ‘scripts’, which worked fine, which told me that somehow python itself was working:
C:\Program Files (x86)\Python36-32\Tools\scripts>…\python .\google.py test
It opened the browser with google.com, searching for the text ‘test’.
In the instruction, you did say a number of libraries are needed. I am not sure how to ‘activate’ or configure these libraries.
What should I do to get the script running?
Thank you!