Closed kigster closed 3 years ago
@kigster udemy-dl do support downloading multiple courses sequentially from a file containing list of course urls separated by new lines. Thanks for the PR.
python udemy-dl -u USER -p PASS courses.txt
@r0oth3x49 I don't know how I missed that — where is that documented?
Why?
I have about 30 Udemy courses that I bought, and wanted to watch them on my Plex. I was very happy to have found this amazing Python Script.
Unfortunately, I am not very proficient in Python, so it was easier for me to put together a shell script that uses
udemy-dl
to download (serially, or concurrently) course videos for any number of courses specified in a simple toml file shown below.Using the
download.sh
script I was able to pull down 256GB of courses!What's Included
download.sh
courses-example.toml
.download.sh
(a cache of the help screen for download.sh)Downloading Multiple Courses at Once (Serially, or in Parallel)
A provided shell script
download.sh
is able to download multiple course at once, provided the following file exists:courses.toml
:You don't need to have any URLs in the
[done]
section, but you must keep the[done]
section header. The script grabs all URLs between[todo]
and[done]
In addition, the script:
~/.bashmatic
pip
is a valid command, and remove the symlink if it's not (eg, points to a non-existent python distribution)pip
if not therepip install -r requirements.txt
Usage
To download multiple courses, follow these steps:
courses.toml
of the format described above and below (also, see courses-example.toml file).cookies.txt
of the formataccess_token=XXX
whereXXX
is your access token cookie (see above for how to get it).~/Courses
which will be auto-created.Downloading Concurrently
Using two additional environment variables you can tell the script to perform the operations in parallel, as well as to optionally generate the "info" file for each course, which is the result of the
--info
command.