youtube-dl is a handy little command-line utility that, with the right command, automagically downloads videos from Youtube as well as other platforms such as Vimeo, Lynda.com, BBC, CNN etc..(Full list of supported websites)
Kindly proceed to youtube-dl's Github repo for detailed installation instructions for your respective OS
In case of an error, make sure you have Python 2.6, 2.7 or 3.2+ installed as youtube-dl needs it to run.
Step One: Log in
Go to the Lynda.com and log in with either your personal/organization account.
Step Two: Cookies.txt
We need a way to let youtube-dl know that you are logged in so that it can download premium videos. youtube-dl allows us to do this by passing through a text file called cookies.txt containing cookies from our browser.
Luckily, there are Google Chrome and Firefox extensions that create the cookies.txt file for you. So, to get us going:
- Download the extension for your respective browser from the links above.
- While on the tab with Lynda.com logged in, activate the extension and download your cookies file.
- Create a folder at a location of your choosing (we'll use this for our downloads) and place your cookies file in the said folder. Ensure your file is named cookies.txt.
Lastly: Download away
- Open your terminal/cmd app and navigate to the folder with the cookies.txt in Step 2 above.
- Just one more command to get youtube-dl downloading, as below:
youtube-dl --cookies cookies.txt "https://www.lynda.com/Illustrator-tutorials/Illustrator-CC-2018-One-One-Fundamentals/633853-2.html" -o "Lynda.com - %(playlist)s/%(chapter_number)s - %(chapter)s/%(playlist_index)s - %(title)s.%(ext)s" --write-sub
Let's go through the above code:
youtube-dl - calls the youtube-dl utility
--cookies - allows you to pass your cookies.txt file
cookies.txt - link to the cookies.txt file we created in Step 2 above. If you stored the cookies.txt file in another location, make sure you enter the proper relative link to it.
"https://www.lynda.com/Illustrator-tutorials/Illustrator-CC-2018-One-One-Fundamentals/633853-2.html" - replace this with the link for the course you want to download.
-o "Lynda.com - %(playlist)s/%(chapter_number)s - %(chapter)s/%(playlist_index)s - %(title)s.%(ext)s" - This part solves a big headache. Normally, all the course videos would be lumped in the folder in no particular order.
This code organises them into Lynda.com Course Name > Chapter Number - Chapter Name > Video Number - Video Title. Perfect order to consume your tutorials.
If you like to tinker & experiment or just want to find out more about youtube-dl options, go through their well-written documentation.