dinosaurfiles-zz / cybrary-video-downloader

Downloads Course Videos From Cybrary.it
43 stars 24 forks source link

Cybrary Session Expires #12

Closed fawad1997 closed 6 years ago

fawad1997 commented 7 years ago

Not an issue as such, but sessions timed out and i have to run script again after every video, can we just communicate with cybrary after some time so our session remains active? Just a suggestion


Traceback (most recent call last):
  File "cybrary-video-downloader.py", line 74, in <module>
    main()
  File "cybrary-video-downloader.py", line 71, in main
    downloadCourseVideos(args.quality, args.course)
  File "cybrary-video-downloader.py", line 46, in downloadCourseVideos
    lessonHTML = (session.get(lessonLink.get('href'), verify=args.ssl)).text
  File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 487, in get
    return self.request('GET', url, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 475, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 585, in send
    r = adapter.send(request, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/requests/adapters.py", line 453, in send
    raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', error(104, 'Connection reset by peer'))
dinosaurfiles-zz commented 7 years ago

Just checked the expiry of a session and it expires long enough. How long does your download takes before you encounter the error?

dinosaurfiles-zz commented 7 years ago

Can you run this for me and post the output here? python -c "import ssl; print ssl.OPENSSL_VERSION" python -c "from OpenSSL.SSL import SSLeay_version, SSLEAY_VERSION; print SSLeay_version(SSLEAY_VERSION)"