Closed Make42 closed 8 years ago
@Make42 This issue was fixed in this pull request: #439. Please use version from github, not pip.
@rbrito We desperately need to update pip version...
@balta2ar I did
cd /directory/where/I/want/my/courses
virtualenv my-coursera
cd my-coursera
source bin/activate
git clone https://github.com/coursera-dl/coursera
cd coursera
pip install -r requirements.txt
./coursera-dl ...
and got
$ ./coursera-dl -u username -p password hadoop
Downloading class: hadoop
Starting new HTTPS connection (1): class.coursera.org
~/coursera-download/my-coursera/local/lib/python2.7/site-packages/requests/packages/urllib3/util/ssl_.py:315: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#snimissingwarning.
SNIMissingWarning
~/coursera-download/my-coursera/local/lib/python2.7/site-packages/requests/packages/urllib3/util/ssl_.py:120: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
InsecurePlatformWarning
404 Client Error: Not Found for url: https://class.coursera.org/hadoop
Starting new HTTPS connection (1): www.coursera.org
~/coursera-download/my-coursera/local/lib/python2.7/site-packages/requests/packages/urllib3/util/ssl_.py:120: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
InsecurePlatformWarning
Traceback (most recent call last):
File "./coursera-dl", line 6, in <module>
coursera_dl.main()
File "~/coursera-download/my-coursera/coursera/coursera/coursera_dl.py", line 1056, in main
if download_class(args, class_name):
File "~/coursera-download/my-coursera/coursera/coursera/coursera_dl.py", line 1034, in download_class
return download_on_demand_class(args, class_name)
File "~/coursera-download/my-coursera/coursera/coursera/coursera_dl.py", line 973, in download_on_demand_class
login(session, args.username, args.password)
File "~/coursera-download/my-coursera/coursera/coursera/cookies.py", line 121, in login
headers=headers, allow_redirects=False)
File "~/coursera-download/my-coursera/local/lib/python2.7/site-packages/requests/sessions.py", line 511, in post
return self.request('POST', url, data=data, json=json, **kwargs)
File "~/coursera-download/my-coursera/local/lib/python2.7/site-packages/requests/sessions.py", line 468, in request
resp = self.send(prep, **send_kwargs)
File "~/coursera-download/my-coursera/local/lib/python2.7/site-packages/requests/sessions.py", line 576, in send
r = adapter.send(request, **kwargs)
File "~/coursera-download/my-coursera/local/lib/python2.7/site-packages/requests/adapters.py", line 447, in send
raise SSLError(e, request=request)
requests.exceptions.SSLError: [Errno 1] _ssl.c:510: error:14094410:SSL routines:SSL3_READ_BYTES:sslv3 alert handshake failure
Take in mind that the course "hadoop" had already worked with my previous approach...
@Make42 In that case I suggest that you offload file downloading to an external downloader such as aria2 (--aria
option). If aria2 fails with similar error code too, you can configure it to ignore SSL certificate verification in its configuration file.
@balta2ar: ./coursera-dl --aria -u name -p pass hadoop
fails similarily. Can you point were to configure aria?
@Make42 Put this into ~/.aria2/aria2.conf
:
check-certificate=false
But I'm afraid this isn't gonna help. aria2 is only used to download media files such as lectures. Course pages are still downloaded using requests (or urllib3) python library. coursera-dl does not support an option to turn off SSL verification for that part of networking interaction.
If you're really motivated, you can fix the code. It's actually very simple to do a few hacks here and there. For example, your code currently fails at this line: https://github.com/coursera-dl/coursera-dl/blob/master/coursera/cookies.py#L121. All you need to do (according to the documentation: http://docs.python-requests.org/en/v1.0.4/user/advanced/#ssl-cert-verification) is to add verify=False
argument to the function call. You most certainly will need to do the same in other places where requests library is called.
P.S. While answering your question I glimpsed over the older similar SSL issues and noticed this: https://github.com/coursera-dl/coursera-dl/issues/377#issue-94456820. Dude, what the f*ck?? You already reported that very same issue last year and the thread is full of discussions and advices on how to address the problem. Go read the thread and try suggested solutions.
@balta2ar: I know, I know (or at least I am able to recognize, now that you mention it, that those errors are the same) - and the issue still stands. The problem is that I am using Python 2.7.6 which is a little old on my Kubuntu 14.4. There is no new Python in the repos. Trying to update python f\ up my entire machine - I am not doing that again! So for some reason the whole thing works with not using Github-Version, but the pip-version. Don't ask me why. You asking me to use the Github-Version and I had hoped that this would have been resolved by now, but I guess it never will and I will just have to wait until I get a new Kubuntu and with it a newer Python. In short: 1) that entire threat you mentioned has not helped me, 2) I am a little sad that this issue is still not resolved.
To download and install coursera-dl I proceeded in the way described in https://github.com/coursera-dl/coursera-dl/issues/475#issuecomment-211243263 and now I just did
which worked for the course
hadoop
, but the coursesintro-to-big-data
andgraph-analytics
cannot be found apparently:I am sure the issue is already resolved, but I am not able to decipher the error message. Could someone please point me to the solution? Thanks.
BTW:
--clear-cache
did not help and yes, I logged into the courses to make sure I am registered for them.