|Michael Reber 76ca6a36bf Fixing timeout issue||7 months ago|
|README.md||7 months ago|
|linuxacademy-dl.py||7 months ago|
This script will download courses from Linux Academy for offline consumption.
Use of this script is for personal consumption of content only. The content this script downloads is protected by copyright and must not be shared.
Please exercise good judgement when using this script. The folks at Linux Academy work hard to make quality courses and you should support them by paying for a subscription if you can. You may also wish to speak with your employer to find out if they would be willing to pay for your subscription.
Tested on a fresh install of CentOS 7.6 Your installation packet-names may vary depending on your OS.
$ sudo -i # yum install python3 python3-pip git unzip ffmpeg -y # pip3 install selenium youtube-dl # cd /opt && git clone https://code.michu-it.com/michael/selenium-linuxacademy-dl.git # cd selenium-linuxacademy-dl && chmod +x linuxacademy-dl.py
You will need Chrome or Firefox and its matching driver.
# wget https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm # yum install ./google-chrome-stable_current_*.rpm # wget https://chromedriver.storage.googleapis.com/78.0.3904.105/chromedriver_linux64.zip # unzip chromedriver_linux64.zip # cp chromedriver /usr/bin/
Install Mozilla Firefox and download geckodriver.
# apt install firefox # tar xzf geckodriver-*-linux64.tar.gz # cp geckodriver /usr/bin/
This will only work with an active Linux Academy subscription. If you do not have one, please get one here.
Usage: ./linuxacademy-dl.py [-u|--username] [-p|--password] [-d|--download-dir] [-c|--cookies-file] COURSE_URL Options may be replaced with environment variables. Command line options take precedence. LADL_USERNAME, LADL_PASSWORD, LADL_DIR, LADL_COOKIES Examples: $ ./linuxacademy-dl.py -u firstname.lastname@example.org -p p@ssw0rd https://linuxacademy.com/cp/modules/view/id/346 $ export LADL_USERNAMEemail@example.com $ export LADL_PASSWORD=p@ssw0rd $ export LADL_DIR=/opt/linux-academy-videos $ ./linuxacademy-dl.py https://linuxacademy.com/cp/modules/view/id/346
The username/email and password fields are required. The cookie file will opt to
$PWD/cookies.txt and the download directory will default to
$SCRIPT_DIR is the path of the