├── README.md └── lynda-dl.py /README.md: -------------------------------------------------------------------------------- 1 | # lynda-dl 2 | 3 | Works for ubuntu 14.04 and Python 2.7.6. 4 | 5 | ## Install beautifulsoup: 6 | 7 | sudo apt-get install python-bs4 8 | 9 | ## Install youtube-dl: 10 | 11 | Install youtube-dl via pip (not apt) to have the "good" version: 12 | 13 | sudo apt-get install python-setuptools 14 | sudo easy_install pip 15 | sudo pip install --upgrade youtube-dl 16 | 17 | ## HOW TO: 18 | 1. Select your course on **http://www.lynda.com/** and replace the link on **line 8** by your link. 19 | 2. Replace the key URL on **line 12** by your key URL. 20 | 3. Replace yourLogin and yourPassword **on line 15** by your login and your password to access the site. 21 | 4. Run script: 22 | python lynda-dl.py 23 | 5. The downloaded videos are in the current folder. 24 | -------------------------------------------------------------------------------- /lynda-dl.py: -------------------------------------------------------------------------------- 1 | # adapted from http://fossbytes.com/how-to-download-lynda-com-videos-using-youtube-dl/ 2 | 3 | import os 4 | import httplib2 5 | from bs4 import BeautifulSoup, SoupStrainer 6 | 7 | http = httplib2.Http() 8 | status, response = http.request('http://www.lynda.com/Unity-tutorials/Unity-5-2D-Building-Tile-Map-Editor/384876-2.html') # url from the site you'd like to scrape 9 | 10 | for link in BeautifulSoup(response).find_all('a', href=True): 11 | #print link['href'] 12 | if 'http://www.lynda.com/Unity-tutorials/' in link['href']: # parse only the links that contain the key URL to your specific tutorial 13 | l = link['href'] 14 | #print l 15 | os.system("youtube-dl --username yourLogin --password yourPassword " + l) # login + password lynda to change. nb : the space after your password is usefull 16 | --------------------------------------------------------------------------------