This repository has been archived by the owner on Dec 30, 2021. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 94
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
lynda-dl v0.2, updated code quality, added option to check the info a…
…bout complete course, added option to download courses from a text file containing list of course urls, fixed #26 (Renamed 7z to MP4), fixed #25 (Numbers on lectures), fixed #22 (Still have UnicodeEncodeError)
- Loading branch information
Showing
24 changed files
with
2,293 additions
and
1,052 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
course.txt | ||
pack.sublime-project | ||
pack.sublime-workspace | ||
# Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
*.py[cod] | ||
*$py.class | ||
|
||
# C extensions | ||
*.so | ||
|
||
# Distribution / packaging | ||
.Python | ||
env/ | ||
build/ | ||
develop-eggs/ | ||
dist/ | ||
downloads/ | ||
eggs/ | ||
.eggs/ | ||
lib/ | ||
lib64/ | ||
parts/ | ||
sdist/ | ||
var/ | ||
*.egg-info/ | ||
.installed.cfg | ||
*.egg | ||
|
||
# PyInstaller | ||
# Usually these files are written by a python script from a template | ||
# before PyInstaller builds the exe, so as to inject date/other infos into it. | ||
*.manifest | ||
*.spec | ||
|
||
# Installer logs | ||
pip-log.txt | ||
pip-delete-this-directory.txt | ||
|
||
# Unit test / coverage reports | ||
htmlcov/ | ||
.tox/ | ||
.coverage | ||
.coverage.* | ||
.cache | ||
nosetests.xml | ||
coverage.xml | ||
*,cover | ||
.hypothesis/ | ||
|
||
# Translations | ||
*.mo | ||
*.pot | ||
|
||
# Django stuff: | ||
*.log | ||
local_settings.py | ||
|
||
# Flask stuff: | ||
instance/ | ||
.webassets-cache | ||
|
||
# Scrapy stuff: | ||
.scrapy | ||
|
||
# Sphinx documentation | ||
docs/_build/ | ||
|
||
# PyBuilder | ||
target/ | ||
|
||
# IPython Notebook | ||
.ipynb_checkpoints | ||
|
||
# pyenv | ||
.python-version | ||
|
||
# celery beat schedule file | ||
celerybeat-schedule | ||
|
||
# dotenv | ||
.env | ||
|
||
# virtualenv | ||
.venv/ | ||
venv/ | ||
ENV/ | ||
|
||
# Spyder project settings | ||
.spyderproject | ||
|
||
# Rope project settings | ||
.ropeproject |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# *Nasir Khan (r0ot h3x49)* | ||
|
||
- **https://r0oth3x49.herokuapp.com** | ||
- **https://github.com/r0oth3x49** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Change Log | ||
|
||
|
||
## 0.2 (2018-06-04) | ||
|
||
Features: | ||
- Download specific quality for course videos (option: `-q / --quality`). | ||
- Get user input if no credentials provided using command line argument. | ||
- List down all available resolution for a video in a course (option: `--info`). | ||
- Download multiple courses by providing text file containing list of courses. | ||
|
||
Bugfixes: | ||
- ZeroDivision error fixed. | ||
|
||
|
||
## 0.1 (2017-08-29) | ||
|
||
Features: | ||
- Resume capability for a course video. | ||
- Downloads all available subtitles if any attached with video. | ||
- Saves course to user provided path (directory), default is current directory (option: `-d / --directory`). | ||
- Skip captions/subtitle and download course only (option: `--skip-sub`). | ||
- Download captions/subtitle only thanks to @leo459028 (option: `--sub-only`). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
|
||
Copyright (c) 2018 Nasir Khan (r0ot h3x49) | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the | ||
Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, | ||
and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR | ||
ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH | ||
THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,94 +1,153 @@ | ||
[![GitHub stars](https://img.shields.io/github/stars/r0oth3x49/lynda-dl.svg?style=flat-square)](https://github.com/r0oth3x49/lynda-dl/stargazers) | ||
[![GitHub forks](https://img.shields.io/github/forks/r0oth3x49/lynda-dl.svg?style=flat-square)](https://github.com/r0oth3x49/lynda-dl/network) | ||
[![GitHub issues](https://img.shields.io/github/issues/r0oth3x49/lynda-dl.svg?style=flat-square)](https://github.com/r0oth3x49/lynda-dl/issues) | ||
|
||
|
||
# lynda-dl | ||
**A cross-platform python based utility to download courses from lynda.com for personal offline use.** | ||
**A cross-platform python based utility to download courses from lynda for personal offline use.** | ||
|
||
[![lynda.png](https://s26.postimg.cc/bsm316qax/lynda.png)](https://postimg.cc/image/8lrjhk5ut/) | ||
|
||
## ***Features*** | ||
|
||
- Resume capability for a course video. | ||
- Supports organization and individual lynda users both. | ||
- List down course contents and video resolution, suggest the best resolution (option: `--info`). | ||
- Download/skip all available subtitles for a video (options: `--skip-sub, --skip-sub`). | ||
- Download lecture(s) requested resolution (option: `-q / --quality`). | ||
- Download course to user requested path (option: `-d / --directory`). | ||
|
||
## ***Issue Reporting Guideline*** | ||
|
||
To maintain an effective bugfix workflow and make sure issues will be solved, I ask reporters to follow some simple guidelines. | ||
|
||
Before creating an issue, please do the following: | ||
|
||
1. **Use the GitHub issue search** — check if the issue has already been reported. | ||
2. **Check if the issue has been fixed** — try to reproduce it using the latest `master` in the repository. | ||
3. Make sure, that information you are about to report is related to this repository | ||
and not the one available ***Python's repository***, Because this repository cannot be downloaded via pip. | ||
|
||
A good bug report shouldn't leave others needing to chase you up for more | ||
information. Please try to be as detailed as possible in your report. What is | ||
your environment? What was the course url? What steps will reproduce the issue? What OS | ||
experience the problem? All these details will help to fix any potential bugs as soon as possible. | ||
|
||
[![lynda-dl.png](https://s26.postimg.cc/upmyj37tl/lynda-dl.png)](https://postimg.cc/image/937y22991/) | ||
### ***Example:*** | ||
|
||
### Requirements | ||
> Short and descriptive example bug report title | ||
> | ||
> A summary of the issue and the OS environment in which it occurs. If | ||
> suitable, include the steps required to reproduce the bug. | ||
> | ||
> 1. This is the first step | ||
> 2. This is the second step | ||
> 3. Further steps, etc. | ||
> | ||
> `<url>` - a lynda course link to reproduce the error. | ||
> | ||
> Any other information you want to share that is relevant to the issue being reported. | ||
## ***Requirements*** | ||
|
||
- Python (2 or 3) | ||
- Python `pip` | ||
- Python module `requests` | ||
- Python module `colorama` | ||
- Python module `unidecode` | ||
- Python module `six` | ||
- Python module `requests[security]` or `pyOpenSSL` | ||
|
||
### Install modules | ||
## ***Module Installation*** | ||
|
||
pip install -r requirements.txt | ||
|
||
### Tested on | ||
## ***Tested on*** | ||
|
||
- Windows 7/8/8.1 | ||
- Windows 7/8/8.1/10 | ||
- Kali linux (2017.2) | ||
|
||
### Download lynda-dl | ||
- Ubuntu-LTS (64-bit) (tested with super user) | ||
- Mac OSX 10.9.5 (tested with super user) | ||
|
||
## ***Download lynda-dl*** | ||
|
||
You can download the latest version of lynda-dl by cloning the GitHub repository. | ||
|
||
git clone https://github.com/r0oth3x49/lynda-dl.git | ||
|
||
|
||
### Usage | ||
## ***Usage*** | ||
|
||
***Download course using user credentials*** | ||
|
||
python lynda-dl.py https://www.lynda.com/COURSE_NAME/ID.html | ||
python lynda-dl.py https://www.lynda.com/COURSE_NAME/ID.html | ||
***OR*** | ||
|
||
python lynda-dl.py -u user@domain.com -p p4ssw0rd https://www.lynda.com/COURSE_NAME/ID.html | ||
python lynda-dl.py -u user@domain.com -p p4ssw0rd https://www.lynda.com/COURSE_NAME/ID.html | ||
***Download course using organization's library card*** | ||
|
||
python lynda-dl.py -o organization https://www.lynda.com/COURSE_NAME/ID.html | ||
python lynda-dl.py -o organization https://www.lynda.com/COURSE_NAME/ID.html | ||
***OR*** | ||
|
||
python lynda-dl.py -u library_card_num -p library_card_pin -o organization https://www.lynda.com/COURSE_NAME/ID.html | ||
python lynda-dl.py -u library_card_num -p library_card_pin -o organization https://www.lynda.com/COURSE_NAME/ID.html | ||
***Download course to a specific location using user credentials*** | ||
|
||
python lynda-dl.py https://www.lynda.com/COURSE_NAME/ID.html -d "/path/to/directory/" | ||
python lynda-dl.py https://www.lynda.com/COURSE_NAME/ID.html -d "/path/to/directory/" | ||
***OR*** | ||
|
||
python lynda-dl.py -u user@domain.com -p p4ssw0rd https://www.lynda.com/COURSE_NAME/ID.html -d "/path/to/directory/" | ||
python lynda-dl.py -u user@domain.com -p p4ssw0rd https://www.lynda.com/COURSE_NAME/ID.html -d "/path/to/directory/" | ||
|
||
***Download course to a specific location using organization's library card*** | ||
|
||
python lynda-dl.py -o organization https://www.lynda.com/COURSE_NAME/ID.html -d "/path/to/directory/" | ||
python lynda-dl.py -o organization https://www.lynda.com/COURSE_NAME/ID.html -d "/path/to/directory/" | ||
***OR*** | ||
|
||
python lynda-dl.py -u library_card_num -p library_card_pin -o organization https://www.lynda.com/COURSE_NAME/ID.html -d "/path/to/directory/" | ||
python lynda-dl.py -u library_card_num -p library_card_pin -o organization https://www.lynda.com/COURSE_NAME/ID.html -d "/path/to/directory/" | ||
|
||
|
||
### Advanced Usage | ||
## **Advanced Usage** | ||
|
||
<pre><code> | ||
Author: Nasir khan (<a href="http://r0oth3x49.herokuapp.com/">r0ot h3x49</a>) | ||
|
||
Usage: lynda-dl.py [-u (USERNAME/LIBRARY CARD NUMBER)][-p (PASSWORD/LIBRARY CARD PIN)] | ||
[-o ORGANIZATION] COURSE_URL [-s/--sub-only] [-d DIRECTORY] | ||
|
||
Options: | ||
General: | ||
-h, --help Shows the help for program. | ||
-v, --version Shows the version of program. | ||
|
||
Advance: | ||
-u, --username Username or Library Card Number. | ||
-p, --password Password or Library Card Pin. | ||
-o, --organization Organization, registered at Lynda. | ||
-s, --sub-only Download the captions/subtitle only | ||
-d, --directory Output directory where the videos will be saved, | ||
default is current directory. | ||
|
||
Example: | ||
python lynda-dl.py https://www.lynda.com/course_name/id.html | ||
</code></pre> | ||
usage: lynda-dl.py [-h] [-v] [-u] [-p] [-o] [-d] [-q] [--info] [--sub-only] | ||
[--skip-sub] | ||
course | ||
|
||
A cross-platform python based utility to download courses from lynda for | ||
personal offline use. | ||
|
||
positional arguments: | ||
course Lynda course or file containing list of courses. | ||
|
||
General: | ||
-h, --help Shows the help. | ||
-v, --version Shows the version. | ||
|
||
Authentication: | ||
-u , --username Username or Library Card Number. | ||
-p , --password Password or Library Card Pin. | ||
-o , --organization Organization, registered at Lynda. | ||
|
||
### Note | ||
<pre><code>Do not change the position of any argument as given under the Usage, this may cause an error or failur in downloading of course.</code></pre> | ||
Advance: | ||
-d , --directory Download to specific directory. | ||
-q , --quality Download specific video quality. | ||
|
||
Others: | ||
--info List all lectures with available resolution. | ||
--sub-only Download captions/subtitle only. | ||
--skip-sub Download course but skip captions/subtitle. | ||
|
||
Example: | ||
python lynda-dl.py COURSE_URL | ||
python lynda-dl.py -o organization COURSE_URL | ||
|
||
</code></pre> |
Oops, something went wrong.