Closed Lewis-Clayton closed 11 years ago
OK, I think about how to create a solution for this. Perhaps I refactor the code and use somethine like selenium for scraping the website.
Can you please restest the download?
Hi abrausch,
I think Coursera updated their login mechanic again. Either way you can get Mechanize working with the cookie by adding this:
cauth = "_HJ-ME3aBipizN20gB5Q_iLkN4jeb..blah..blah..blah" cookie = Mechanize::Cookie.new :domain => '.coursera.org', :name => "CAUTH", :value => cauth, :path => '/', :expires => (Date.today + 1).to_s agent.cookie_jar << cookie
Regards,
Lewis
Can you perhaps create a pull request for that?
Hi Alex,
It looks like the Coursera site now redirects if your browser doesn't support JavaScript, which Mechanize doesn't. As such the script can no longer log into the site and we get this error:
coursera-downloader.rb:19:in
<main>': undefined method
email=' for nil:NilClass (NoMethodError)Regards,
Lewis