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

Failed to authenticate as... #81

Closed carlosror closed 11 years ago

carlosror commented 11 years ago

Hi, thanks for the hard work! I used the script fine on Saturday and downloaded 2 of the courses I took. As of yeterday (Sunday) it's telling me it failed to auttenticate me, it's raising an exception on line 113 of coursedownloader.py:

Exception: Failed to authenticate as myUsername

I hope it's some silly mistake I am making. I am not doing anything differently from last Saturday, I don't think. What else can I try to troubleshoot? Thank you.

dreyescat commented 11 years ago

What did you use as username? Try using your email address instead. Don't know if Coursera has restricted the authentication to use only the email.

ghost commented 11 years ago

It was always e-mails right? no usernames were allowed by default I'd reckon.

carlosror commented 11 years ago

coursera -u myEmail -p myPassword -d pathToDisk courseName

Same as I did on Saturday, not sure what I am doing wrong now...:(

If I don't include -p myPassword, it prompts me for the password and then it rejects me again after entering it.

carlosror commented 11 years ago

Also in the browser logged out of Coursera and back in using my email and password.

dreyescat commented 11 years ago

I must have confused my Coursera with my bitbucket account authentication. Bitbucket allows both strings as usernames, username and email ;). Sorry, my fault.

BTW, I have just tried to download one of my courses and it is working smoothly.

ghost commented 11 years ago

@carlosror are you using windows and have you installed this script?? or do you is using your command prompt like you first cd to the directory and then run === python courseradownloader.py ?? and are you sure your using the latest commit because commit e6e7906f0628778eb256b287ea567b3e1c1f63e9 seemed to fix those errors

carlosror commented 11 years ago

Great! :) I thought maybe Coursera had blocked it somehow.

So you type coursera-dl -u yourEmail -p yourPwd -d path courseName?

carlosror commented 11 years ago

Yes using Windows and I open command prompt and type:

coursera-dl -u myEmail -p myPassword -d pathToDisk courseName

ghost commented 11 years ago

yeah, if you have installed the script

carlosror commented 11 years ago

Yes I installed it and ran it ok a few days ago...O well..

dreyescat commented 11 years ago

Do you use Firefox? If so, could you please run the script without Firefox running? Maybe the browser is interfering the cookies saved by the script. It sounds weird, but if it worked before maybe it is another program that interferes.

carlosror commented 11 years ago

You are a genius! I closed Firefox, re-started the Command Prompt, and that did it! THANK YOU.

dreyescat commented 11 years ago

Glad it helped!

carlosror commented 11 years ago

Solved by closing Firefox and re-starting Command Prompt, per dreyescat's suggestion. :-)