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 300 forks source link

Cont. issue#49, v1.4.10, html parser, Error: "Warning: no downloadable content found for <several courses>" #69

Closed SantiagoG closed 11 years ago

SantiagoG commented 11 years ago

Hello Dirk,

First, thank you for this script and all the updates and your work into it in general. I've been using it without any problems using Homebrew's python -which also includes pip- but since today I keep getting error message above even though using html parser.

Thanks!

HyShai commented 11 years ago

Same issue here. Trying to download - programdesign-001 - and getting " Warning: no downloadable content found for programdesign-001, did you accept the honour code?" (i had accepted already).

SantiagoG commented 11 years ago

Yep, that is not the problem. I thought that it was because I was working with courses that have ended -even though the material was still open- but that is also not the problem.

maitreyak commented 11 years ago

Same issue. I tried changing the default parser (lxml,html5lib) yet not luck.

bhrgunatha commented 11 years ago

I get this for all 4 of my current courses. I'm using python 2.7.5 / beautiful soup 4.3.1 / mechanize 0.2.5 Not sure if it's relevant, but I tried stepping through the code - in the BeautifulSoup section (elelment.py) the in find_all I looked at all the objects returned when navigating the video index page. I found these - just before the find_all method returned an empty list of found objects.

Seems its a problem with the way coursera uses javascript.

Why do others not have this problem? Won't it be the same for everyone?

bhrgunatha commented 11 years ago

Sorry formatting of html strings

<div id="coursera-loading-nojs" style="text-align:center; margin-bottom:10px;display:none;">Please use a <a href="/browsers">modern browser </a> with JavaScript enabled to use Coursera.</div>

<div><span id="coursera-loading-js" style="display: none; padding-left:45%">loading   <img src="https://d2wvvaown1ul17.cloudfront.net/site-static/images/icons/loading.gif"/></span></div>

<noscript><div style="text-align:center; margin-bottom:10px;">Please use a <a href="/browsers">modern browser </a> with JavaScript enabled to use Coursera.</div></noscript>
stephen-andrew-lynch commented 11 years ago

Same problem. Using the same versions as bhrgunatha.

dgorissen commented 11 years ago

Confirmed. Will look into it tonight and/or tomorrow. Any further information/debug output is always helpful.

bhrgunatha commented 11 years ago

Sorry I've gone about as far as I can. I tried lxml and html5lib for the parser also with no luck. I did read that mechanize doesn't support javascript and the only other suggestion I could find were to use a full-fledged browser like webkit or selenium instead of mechanize.

dgorissen commented 11 years ago

Coursera changed their authentication details. Updated the code, seems to work for me. Test with the master branch, if you still have issues reopen.

sunwooz commented 11 years ago

How do I update my coursera-dl install to the master branch? I tried doing pip install coursera-dl --upgrade, but it's saying all requirements are up to date?

dgorissen commented 11 years ago

You need to checkout the repo using git. See the github docs ( https://help.github.com/articles/set-up-git). If I get another confirmation that it works (or I get to my other machine) I will update the package in on pypi (so you can upgrade with pip)


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

On Fri, Aug 23, 2013 at 4:29 PM, Sunwoo Yang notifications@github.comwrote:

How do I update my coursera-dl install to the master branch? I tried doing pip install coursera-dl --upgrade, but it's saying all requirements are up to date?

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

maitreyak commented 11 years ago

Works well. Thank you. I cloned the repo and ran: python coursera-dl/courseradownloader/courseradownloader.py -u username -p password -d destDir classname

Just finished downloading the entire course. OS:Ubuntu 64

jaskerr commented 11 years ago

Works. Followed @maitreyak suggestion. Thanks.

sunwooz commented 11 years ago

Did the same and it worked.

Thanks a lot! Love this script.

bhrgunatha commented 11 years ago

Yes - the fix is working. I suck at debugging :( Thanks for your quick action and a great and useful tool.