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.73k stars 299 forks source link

This week's lectures from casebasedbiostat-001 are not getting downloaded #64

Closed rpolavar closed 10 years ago

rpolavar commented 10 years ago

ar All: I am able to download the lectures from the previous two weeks. Not this week. Thank you for your help. Ramana

dgorissen commented 10 years ago

still an issue?

rpolavar commented 10 years ago

Hi Dirk:

Yes. The problem continues. I think that the problem is related to long file name. Thank you.

Best regards,

Ramana

On 8/10/13, Dirk Gorissen notifications@github.com wrote:

still an issue?


Reply to this email directly or view it on GitHub: https://github.com/dgorissen/coursera-dl/issues/64#issuecomment-22440382

dgorissen commented 10 years ago

have you tried running with --trim-path?

rpolavar commented 10 years ago

Hi Dirk:

Thank you for the suggestion but no luck: C:\Users\rpolavar>coursera-dl -u sriramana@gmail.com -p -d c:/coursera - -trim-path casebasedbiostat-001 Coursera-dl v1.4.10 (html.parser) Maximum path length set to 257 Logging in as 'sriramana@gmail.com'...

Course 1 of 1

C:\Users\rpolavar>

Talk to you soon.

Best regards,

Ramana On 8/18/13, Dirk Gorissen notifications@github.com wrote:

have you tried running with --trim-path?


Reply to this email directly or view it on GitHub: https://github.com/dgorissen/coursera-dl/issues/64#issuecomment-22820295

dgorissen commented 10 years ago

mmm maybe 257 could still be too high a bound in some cases. Try setting max_path_len to 240 or so on line 684 of courseradownloader.py. Then rerun with --trim-path and see what happens.

dgorissen commented 10 years ago

Does that change fix it for you?

rpolavar commented 10 years ago

Unfortunately, no, it did not fix it. It was complaining that it could not trim the path. For now, I found a Perl script that could download all the lectures. This script does not organize the lectures and the other related files into folders. But, it does the trick for me. I shall get back to your program once this course is done. Thank you.

Regards,

Ramana

On 8/23/13, Dirk Gorissen notifications@github.com wrote:

Does that change fix it for you?


Reply to this email directly or view it on GitHub: https://github.com/dgorissen/coursera-dl/issues/64#issuecomment-23170529

RickMeasham commented 10 years ago

I'm having the same problem, but this is likely due to me downloading on a VirtualBox guest to a shared folder on the Host (Windows). The actual path is a lot longer than the downloader has access to.

I wonder if you could create a '--shortfilename' option that rather than save:

 /win/coursera/socialpsychology-001/04 - WEEK 4 Group Behavior The Good, Bad, and Ugly/06 - Lecture 4.3 The Minimal Group From Dots to Discrimination in 60 Seconds/4 - 6 - Lecture 4.3 The Minimal Group From Dots to Discrimination in 60 Seconds.txt

it would save:

 /win/coursera/socialpsychology-001/04/06/Lecture 4.3.txt

And possibly put the full names into a TOC.txt

dgorissen commented 10 years ago

Confirmed & good suggestion. Will have a look and fix this.


Web / Blog : http://dirkgorissen.com Twitter : https://twitter.com/elazungu

On Mon, Aug 26, 2013 at 6:35 AM, RickMeasham notifications@github.comwrote:

I'm having the same problem, but this is likely due to me downloading on a VirtualBox guest to a shared folder on the Host (Windows). The actual path is a lot longer than the downloader has access to.

I wonder if you could create a '--shortfilename' option that rather than save:

/win/coursera/socialpsychology-001/04 - WEEK 4 Group Behavior The Good, Bad, and Ugly/06 - Lecture 4.3 The Minimal Group From Dots to Discrimination in 60 Seconds/4 - 6 - Lecture 4.3 The Minimal Group From Dots to Discrimination in 60 Seconds.txt

it would save:

/win/coursera/socialpsychology-001/04/06/Lecture 4.3.txt

And possibly put the full names into a TOC.txt

— Reply to this email directly or view it on GitHubhttps://github.com/dgorissen/coursera-dl/issues/64#issuecomment-23244338 .

dgorissen commented 10 years ago

In cleaning up the code I changed the current hack to fix this. Still a hack but should crash less often. Could you test with the master branch and see if it all runs ok for you. I havent been able to test in depth yet as Im travelling so report any issues.