dgorissen / coursera-dl

A script for downloading course material (video's, pdfs, quizzes, etc) from coursera.org
http://dirkgorissen.com/2012/09/07/coursera-dl-a-coursera-download-script/
GNU General Public License v3.0
1.74k stars 299 forks source link

File Paths Too Long Need Shortening #152

Closed KCzar closed 9 years ago

KCzar commented 9 years ago

Some courses (particularly econ courses it seems) have videos with very long titles. Because coursera-dl uses the full video name twice (once for the containing folder and once for the video itself) sometimes the file path exceeds the maximum file path length for Windows (260 characters). When this happens, the download fails.

Adding a step that determines the file path length and appropriately shortens the filename (I would propose leaving the folder name fully intact) would be very useful and probably very easy to accomplish.

If I have some time I may give that a shot myself...

Love the package, thanks so much for putting that together!

dgorissen commented 9 years ago

This was covered in #8, see the mppl flag. Its a bit hackish though so pull requests welcome :)

KCzar commented 9 years ago

Ah, thanks! Sorry, I thought I had checked through all of the message board things. I'll give it a shot, and happy to contribute if I find it lacking :).

Nice work on the package though - I now have almost 100 courses downloaded lol. Previously I was doing it all manually...

Any tips on the best way to learn how to use the Mechanize package to its fullest extent? I've gone through tutorials but have had trouble finding an adequate online published API. And I still haven't figured out how to troubleshoot with the package.

Cheers, Ken

Date: Mon, 22 Sep 2014 11:14:11 -0700 From: notifications@github.com To: coursera-dl@noreply.github.com CC: specialkcl66@hotmail.com Subject: Re: [coursera-dl] File Paths Too Long Need Shortening (#152)

This was covered in #8, see the mppl flag. Its a bit hackish though so pull requests welcome :)

— Reply to this email directly or view it on GitHub. =

dgorissen commented 9 years ago

Cant really say more about mechanize than whats online Im afraid. If you feel ambitious you may also want to iron out issues with the master branch which uses requests instead of mechanize (see #126)