Lyndor Save Abandoned

:rocket: Powerful command line tool to download lynda.com courses for personal offline use. :part_alternation_mark:

Project README

Lyndor

Build Status

  • Download Lynda.com course for personal offline use.
  • You will need a Lynda.com Basic, Premium or Organisation account inorder to download a course.
  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)                        

Lyndor in Action

  • On providing course url, the program will download - Course Folder, Chapters, Videos, Subtitles and Info files.
  • Download multiple courses by pasting several urls in Bulk Download.txt
  • info.txt and CONTENT.md file is created, containing additional info about the course.
  • NOTE: The Basic and Premium account costs about $20 and $30 respectively once the 30 day free trial ends, which is not much considering you are investing in your career or following your passion, thus you may get exponential returns.
#supports multiple platforms :)
def Operating_Systems():
    Windows = True
    MacOS   = True
    Linux   = True

    if Windows or MacOs or Linux:
        print('Have fun!!!')

Requirements

  • Python 3.6 or above
  • Python is free to download python
  • NOTE: Windows users must add python.exe to path

Windows installer

Install Lyndor

    # 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 Structure

- 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)

Course Folder Structure

- 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 Structure

- 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)

Usage

  • In order to begin download you have to edit settings.json file first. Have a look in settings folder you will find settings.py
--- 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

Web page at http://127.0.0.1:5000/ 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.)

  • Lynda course can be downloaded in two ways, either with username + password combination or with cookies.txt file
  • For organization login - use cookie method (learn more below)
// 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.

Run Lyndor

# open terminal or commandline
$ python path/to/Lyndor/run.py
  • Windows users can simply double click Run-Lyndor.bat to run the program. Run-Lyndor.bat file should be located in (Lynda) folder where all courses are meant to be downloaded.
# 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 $*
  • How to create alias?

  • The program will ask now for URL, just paste a Course URL in the Terminal/Command-prompt -> press enter.


  • Extract cookies from browser after login to Lynda.com by addon cookies.txt extension
  • Your cookies.txt file must be downloaded in either Downloads or Desktop folder.

Exercise files download


  • 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
  • unzip both the ***driver.zip files to reveal the actual files inside it, then copy the webdriver folder path to add to your PATH variable.
# for Mac or Linux -> add the new webdriver directory path to ~/.bash_profile or ~/.bash_rc
export PATH="/path/to/Lyndor/webdriver:$PATH"
  • Windows users can save the path as usual, here's an example saving PATH in windows, note in the video some different directory is used as a demonstration, you just have to paste in 'webdriver' directory's path instead.
// 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": ""
    }
}

aria2 downloader for faster downloads

// 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
  • Windows users need .exe file to install it, which this program downloads for windows users, you can find a folder inside Lyndor, called 'aria2', it will contains aria2.zip file, just extract the zip file and set the path of the directory to windows PATH variable here's an example saving PATH in windows, watch the video to get a general idea.

Reporting Issues

  • This repository is now no more supported. Please don't report any further issues. Thanks.

Acknowledgement

  • Thanks to youtube-dl, selenium, beautifulsoup, requests, colorama for providing their open source code to enable this project.
Open Source Agenda is not affiliated with "Lyndor" Project. README Source: ankitsejwal/Lyndor
Stars
130
Open Issues
21
Last Commit
1 year ago
License
MIT

Open Source Agenda Badge

Open Source Agenda Rating