soraxas / echo360

Commandline tool for automated downloads of echo360 videos hosted by university
https://cs.tinyiu.com/echo360
MIT License
261 stars 51 forks source link

Work around for authentication issue #56

Open erietz opened 2 years ago

erietz commented 2 years ago

This is a fantastic piece of software! I had quite a difficult time getting logged into echo360 through the selenium browser and thought I would share my solution.

After entering my username into echo360, I was being redirected to the universities SSO and the redirection was causing problems. In fact, I was not able to navigate to any webpage besides google in the chrome instance due to the ssl error below :

This site can’t provide a secure connection googleweblight.com sent an invalid response. ERR_SSL_PROTOCOL_ERROR

I tried adding various options and capabilities to the webdriver Options

from selenium.webdriver.chrome.options import Options

but nothing worked.

What solved the issue was to change change the value of self._useragent in the EchoDownloader class in the file echo360/downloader.py to my user agent which I obtained from the site https://www.whatsmyua.info/

Hopefully this is helpful to someone.

soraxas commented 2 years ago

Thank you for your report!

It's my first time hearing user-agent string have the effect of introducing this error. I'm not sure what is the cause of this. But I'll keep this around in case it happens to others.