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

Failed to authenticate #147

Closed rajarshibiswas closed 9 years ago

rajarshibiswas commented 9 years ago

Coursera-dl v1.5.1 (html.parser) Credentials found in .netrc file Logging in as 'xxxx@gmail.com'... Traceback (most recent call last): File "/usr/local/bin/coursera-dl", line 8, in load_entry_point('coursera-dl==1.5.1', 'console_scripts', 'coursera-dl')() File "/Library/Python/2.7/site-packages/courseradownloader/courseradownloader.py", line 572, in main d.login(args.course_names[0]) File "/Library/Python/2.7/site-packages/courseradownloader/courseradownloader.py", line 135, in login raise Exception("Failed to authenticate as %s" % self.username) Exception: Failed to authenticate as xxxx@gmail.com

Any Idea what went wrong ?

Tomilla commented 9 years ago

Please ensure you have an updated version to coursera-dl (Newest version is 2.02, using command pip install --upgrade coursera-dl)

gpby commented July 08, 2014 The same issue. To solve it try to replace in file courseradownloader.py line 99 LOGIN_FORM = {'email': self.username, 'password': self.password} with LOGIN_FORM = {'email': self.username, 'password': self.password, 'webrequest':'true'}

ref: #137

nick-s-b commented 9 years ago

Any Idea what went wrong ?

Coursera website changed how it handles authentication. Upgrading to 2.x should fix that issue but BEWARE of other 2.x issues that upgrading will bring.

1.5.x was the last good version of coursera-dl. While 2.x handles authentication properly, it fails at simple things like downloading a complete file.

dgorissen commented 9 years ago

See #126

rajarshibiswas commented 9 years ago

Thanks guys for the help. But after updating I am getting the following error. Any help!!

Traceback (most recent call last): File "/usr/local/bin/coursera-dl", line 5, in from pkg_resources import load_entry_point File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 2603, in working_set.require(requires) File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 666, in require needed = self.resolve(parse_requirements(requirements)) File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 565, in resolve raise DistributionNotFound(req) # XXX put more info here pkg_resources.DistributionNotFound: six

dgorissen commented 9 years ago

Please test with the current mechanize branch directly from github. Else follow #126 and upgrade when that is resolved (probably in the next day).

rajarshibiswas commented 9 years ago

Thanks a lot @dgorissen. Seems (mechanize branch) it is working now.