Python script to download INE courses including labs, exercises, quizzes, slides, and, videos!
MIT License
Python script to download INE courses including labs, exercises, quizzes, slides, and, videos!
pip3
requests_toolbelt
requests
loguru
aria2
The script was written based on the APIs of iOS application to prevent Google's Invisible captcha implementation hence you will see a header (X-Ine-Mobile
) hard coded in the script with an static API key required for the IOS API calls to succeed (this is hard-coded in the iOS application binary and can easily be grepped).
Initialization:
username/email
and password
) from config.json
fileJWT
token into Authorization header to use in next API callsall_courses_metadata.json
all_courses_with_access.json
with the dataDownloading of videos:
video name
, url
, and checks if subtitle URL is present and downloads all those!Downloading of slides (format looks like the following):
index.html
file (with cookies in response headers)browsersupport.js
and player.js
files (static can be reused with other slides)css
, js
, woff
, and, pngs
but all have incrementable file names (format differs for text and binary files)while loop
until the incremented file returns 404 and then stops the downloading of category: CSS/JS/WOFF/PNG
Downloading of quizzes (with right answers):
JSON
containing the whole quiz contentPUT
request with right/wrong answers from user, in response to this, the JSON body now contains a new key is_correct
containing the right answerPUT
request then returns the right answers, two files are made with no answers and correct answers.Downloading of exercises:
Markdown
and HTML
formatHTML
content with _exercise_
in file name.Downloading of labs:
HTML content
of it (if present)pip3 install -r requirements.txt
sudo apt install aria2
You can download the latest version of ine-dl by cloning the GitHub repository.
git clone https://github.com/Anon-Exploiter/ine-dl --depth 1
┌──(umar_0x01@b0x)-[~/scripts/ine-dl]
└─$ python3 ine.py
██╗███╗ ██╗███████╗ ██████╗ ██╗
██║████╗ ██║██╔════╝ ██╔══██╗██║
██║██╔██╗ ██║█████╗█████╗██║ ██║██║
██║██║╚██╗██║██╔══╝╚════╝██║ ██║██║
██║██║ ╚████║███████╗ ██████╔╝███████╗
╚═╝╚═╝ ╚═══╝╚══════╝ ╚═════╝ ╚══════╝
Usage: python3 ine.py --all
Help:
-h, --help show this help message and exit
Basic arguments (one or more):
-l LOG, --log-output LOG
Logs output of the script (if required later)
-lct, --list-categories
List all categories
-lcc, --list-courses List all courses
-lcct LCCT, --list-categories-courses LCCT
List all courses of a specific category UUID from -lct
Necessary arguments:
-p PROCESSES, --processes PROCESSES
Number of parallel processes to launch (2 if nothing specified)
-c COURSE, --course COURSE
Download course based on provided UUID from -lcc
-ct CATEGORY, --category CATEGORY
Download whole category based on provided UUID from -lct
-a, --all Download all courses of all categories
Running the Script (displays help menu with no args)
python ine-dl.py
Listing all the courses
python ine-dl.py -lc
Listing course categories
python ine-dl.py -lct
Listing all the courses of a specific category
python ine-dl.py -lcct {category_id}
Logging the script's output into a log file
python ine-dl.py <general_args> -l logfile.log
Downloading all the INE course (your subscription has access to, with/without parallel processing)
python ine-dl.py --all
python ine-dl.py --all -p 2
Downloading a single course
python ine-dl.py -c {course_id}
Downloading all courses of specified category (with/without parallel processes)
python ine-dl.py -ct {category_id}
python ine-dl.py -ct {category_id} -p 2
Please use the script w.r.t the usage guidelines of INE. Do not exhaust their backend servers. Do not dump and share the courses publicly.
Please use this on your own risk, If your account is blocked by the usage of this script, I won't be responsible.