:rocket: Powerful command line tool to download lynda.com courses for personal offline use. :part_alternation_mark:
Features:
- Organizational login (cookies.txt) - Regular login (Username + Password combination)
- Cross platform support - Bulk downloads
- Exercise file download - Subtitles download
- Lib. card + pin support for ex-file - Schedule download (Download later)
- Creates Course & Chapter folders - Generate Info files
- Videos and subtitles renaming - Move videos/subtitles to correct Chapters
- Adjust preferences (settings.json) - aria2 external downloader (for faster downloads)
#supports multiple platforms :)
def Operating_Systems():
Windows = True
MacOS = True
Linux = True
if Windows or MacOs or Linux:
print('Have fun!!!')
# Download Lyndor
# Open terminal or commandline
$ python path/to/Lyndor/install.py
# Apart from many other processes, install.py creates a Lynda folder inside your
# Videos or Movies folder, all the courses will be downloaded to Lynda folder
# this path can be changed later (You can also add you external HDD's path)
Note: Windows users can simply double click install.bat file to run install.py file alternatively.
- Lynda Folder (Here goes all your downloaded courses)
---- Course1
---- Course2
---- Course3
---- Course4
-- Bulk Download.txt (Paste multiple urls for bulk download)
-- Run-Lyndor.bat (For windows user only, double click to launch program)
- Course1 Folder
---- CONTENT.md
---- info.txt
---- 00 - Chapter A // chapter folder
---- 01 - Chapter B // ...
---- 02 - Chapter C
-- 1 - Video A // video file
-- 2 - Video B // video file
-- 3 - Video C // ...
-- 1 - Video A.srt // subtitle file
-- 2 - Video B.srt // subtitle file
-- 3 - Video C.srt // ...
- Lyndor Folder
-- run.py (main file - execute the file, to run the program)
-- install.py (installation file - execute to install Lyndor)
--- module (directory)
--- webdriver (directory)
- chromedriver.zip
- firefoxdriver.zip
--- aria2c (visible to Windows users only)
- aria2c.zip
--- settings (directory)
-- static (directory)
--- css (sub-directory)
--- js (sub-directory)
---- settings.json (settings goes here)
---- settings.js
-- templates (directory)
- settings.py --> Flask webserver (python settings.py)
---- LICENSE
--- .github (directory)
--- images (directory)
--- settings (directory)
-- static (sub-directory)
-- templates (sub-directory)
- settings.py --> Flask webserver (python settings.py)
∏
# open terminal/cmd navigate to LYNDOR folder and run
$ flask run # or
$ python settings/settings.py
# This will run a local Flask web server (terminal output below):
# * Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
# * Restarting with stat
# * Debugger is active!
# * Debugger PIN: 188-604-022
Just edit your preferences and add your credentials here then simply hit Save button and settings.json file will be updated. (settings.json file can be edited directly via text editor as well but editing json file for beginners maybe a bit challenging.)
// settings.json - File
{
"credentials": {
"regular_login": {
"username": "", // not required if downloading via cookies
"password": ""
},
"library_login": { // should be used in combination to cookies.txt
"card_number": "", // Library card number
"card_pin": "", // Library card pin
"organization_url": "" // org. url like: ottawa.ca
},
"exfile_download_pref": "regular-login",
"course_download_pref": "regular-login",
},
"preferences": {
"location": "/path/to/folder/Lynda",
"markdown_links": true, // use markdown links for chapters in CONTENT.md
"download_subtitles": true, // set false otherwise
"download_exercise_file": true, // set false otherwise
"web_browser_for_exfile": "chrome", // prefered web browser "chrome" or "firefox"
"ext-downloader-aria2-installed": false, // set true after installing aria2
"download_time": "", // time schedule download (ex: "01:00" for 1am)
"redownload_course": "prompt" // choose between prompt, skip or force
}
}
Note: "library_login" can only download exercise files so it should be used in combination with cookies.txt method.
# open terminal or commandline
$ python path/to/Lyndor/run.py
# Linux and MacOS users can add Lyndor keyword as alias to launch the program by just typing Lyndor in terminal.
$ alias lyndor='python /path-to/Lyndor/run.py'
# Execute following line to add alias for lyndor in Windows operating system:
C:> doskey lyndor=python PathToLyndor\run.py $*
The program will ask now for URL, just paste a Course URL in the Terminal/Command-prompt -> press enter.
Note: This feature isn't available for organizational login unless you have library login details, setup exercise files download by following the important steps below after Lyndor installation.
During installation two webdriver files will be downloaded inside the webdriver folder from the Internet.
-- ...
-- ...
-- ...
-- install.py
--- webdriver (directory)
- chromedriver.zip
- firefoxdriver.zip
# for Mac or Linux -> add the new webdriver directory path to ~/.bash_profile or ~/.bash_rc
export PATH="/path/to/Lyndor/webdriver:$PATH"
// Edit settings.json - [Prefer updating settings.json from web page its easy]
...
...
"download_exercise_file": false, // set true to download exercise files
"web_browser_for_exfile": "chrome",
"download_time": ""
}
}
// Edit settings.json - [Prefer updating settings.json from web page its easy]
...
...
"ext-downloader-aria2-installed": false, // set true after installing aria2
"location": "/path/to/folder/Lynda",
"download_exercise_file": false,
...
...
}
}
You have an option related to external downloader in settings.json which you can set true for faster downloads, but you need to install the aria2 installer first.
For Mac and Linux users it is very easy to install aria2c from command line.
# for example you can download aria2 on MacOs using homebrew
$ brew install aria2