Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Downloading videos from Lynda.com with Organization Login [SOLVED] #5926
Comments
|
youtube-dl should download courses just fine. Could you run it with |
|
Sure thing. I'll do it tomorrow as soon as I get back to my laptop. When you say "youtube-dl should download courses just fine" you mean that it should be collecting all the videos and not just one video when importing cookies right? |
|
Yes, since it's supported. |
|
@DevKiddo I am trying to use the script that you provided and I get following error. Terminal output with -v is included. sudo python exposure.py Can you help figuring out whats going wrong? Thanks |
|
@dstftw I did try youtube-dl directly with a coursepage but it only downloads a few videos (throughout all the chapters) from a course. UPDATE: I did try this on a windows machine. And everything works fine after using a --cookies option for an institutional login. So, the log in my post above is specific to OS X. |
|
I'm getting the following error on doing everything that you said (before your python script) (I'm trying this for an individual lynda link)
|
|
Hi @pranavkaranjkar and @AV12111994, I've been super busy lately and I'm not sure if I'll have the time to debug your error logs. If this helps, very recently I realized that the lynda iPhone app lets you download all videos of a course to your smartphone, regardless of your account type. It may be just a lot easier to do that and then jailbreak into your phone with software like PhoneBrowse in order to import the downloaded videos into your computer. Hope this helps! |
|
@DevKiddo I had done that on android meanwhile, is solving the purpose, but I want to work it out on my computer too. I can wait. |
|
@AV12111994 does your proxy alive at all? You are using an outdated version of youtube-dl. Update and post the *.dump files when running youtube-dl with |
|
@dstftw http, https proxies were set and I wasn't using any proxy network, so I removed them from .bashrc file. After that I updated the youtube-dl version. By doing this I was able to download the videos from youtube, but on doing
I'm getting this error log:
|
|
Actually I made an httpclient to do that automatically (in Java), just provide a valid cookie and output format. PM me for info guys. |
|
@manrodriguezf Could you tell what's wrong with my error that I put up above? |
|
@DevKiddo I've got mad trying to work it out, if you could help... |
|
@AV12111994 what's your OS? For some reason people using Linux have had issues with this solution. I only tested this on my windows |
|
@DevKiddo Ubuntu 14.04. I also put |
|
Thank you so much for this solution. This seems to be a common problem with people who use institutional log ins. |
|
Thanks for the info, saved tons of time versus downloading 1 video at a time. On my windows machine running "youtube-dl --cookies cookies.txt link-to-the-video" would download the entire list after importing cookies from firefox, but wasn't working on my debian machine. So thanks again! |
|
After the help from this issue, I wrote the following tutorials for someone who'd want to work it out on linux(and hence hopefully mac) or windows. Hope this helps new people trying it out : EDIT: removed, youtube-dl works fine with courses out of the box without any kind of wrappers. |
|
@gdad-s-river you don't need this wrapper, youtube-dl works fine with courses out of the box. |
|
@dstftw , I couldn't understand what wrapper is, that you are talking about... could you explain? |
|
I'm about python code in your tutorial. youtube-dl works fine with course URLs directly. |
|
Oh, didn't know that! Good to know. |
|
@henryjackylucky allavsoft is completely unrelated to youtube-dl. Please refrain from proposing other softwares here, unless it provides some clues to improve youtube-dl. |
|
@yan12125 it's just a spammer. |
Hello!
I am writing to present my solution to this problem which has appeared previously in issue #4888 and issue #5636 . It is quite easy and just requires a tiny bit of manual labor. I have searched the internet for other tools that could download videos from Lynda when having an organization account and youtube-dl seems to be the only one that's able to do the job.
A partial solution was presented in issue #4888 which talked about importing cookies in order to bypass authentication - This works. But you must be careful with the exact format of the cookie file you are importing from your browser. I tried a few extensions in Chrome and Firefox before I was able to succeed and the only one that worked well was a Firefox add-on named "Cookie Exporter 1.5.1-signed" by fliwatüt. Python does not only expect you to import a cookie.txt in a Netscape format but it also expects the cookie.txt to have a specific structure, so you will have to add a first line at the very top of the exported file being "# Netscape HTTP Cookie File" (without the quotes). If you don't add this line at the very top of the cookie.txt file, Python won't read your file, even if it actually is in a Netscape format. Note that before exporting the cookie.txt file from your browser, you must log into your Lynda organization account.
Good. Once that's done you just have to run "youtube-dl --cookies cookies.txt link-to-the-video" and it will download any video you want, but only ONE video - that is, youtube-dl won't collect all the Lynda videos in the course. Downloading say 150 videos from a course manually one by one can be a real pain, so I wrote a small script to automate this process:
EDIT: removed in order not to confuse, youtube-dl works fine with courses.
This script will do 3 things. First it will scrape all the links from a specific Lynda tutorial that you want to have, in this case the placeholder is "http://www.lynda.com/MySQL-tutorials/PHP-MySQL-Essential-Training/119003-2.html". Second, it will parse out only those links which have a key URL that all the videos share in common. In this case, the placeholder is 'http://www.lynda.com/MySQL-tutorials/'. This is extremely important; you need to put the key URL that all the videos share in common because there are many more links in the page and you don't want youtube-dl returning a bunch of invalid URL errors. Finally, after it parses all the links from the actual tutorial videos, it runs "youtube-dl --cookies cookies.txt" for every link that it found. There it is! Youtube-dl will collect all the videos and download them automatically. Remember you'll need to install BeautifulSoup library before you run the script!
A final couple of tips:
Thank you for this awesome library!