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

SSL Error #74

Closed Suhail-SSRC closed 1 year ago

Suhail-SSRC commented 1 year ago

Hello

I've been trying to use the tool, but I keep getting this error `> Echo360 Cloud platform detected

This implies setup_credential, and using web_driver

Please login with your SSO details and type continue when logged in.

================================================================= Binary file of chromedriver not found, will initiate a download process now... Downloading chromedriver binary file for "mac64" Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/urllib/request.py", line 1348, in do_open h.request(req.get_method(), req.selector, req.data, headers, File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/http/client.py", line 1282, in request self._send_request(method, url, body, headers, encode_chunked) File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/http/client.py", line 1328, in _send_request self.endheaders(body, encode_chunked=encode_chunked) File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/http/client.py", line 1277, in endheaders self._send_output(message_body, encode_chunked=encode_chunked) File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/http/client.py", line 1037, in _send_output self.send(msg) File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/http/client.py", line 975, in send self.connect() File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/http/client.py", line 1454, in connect self.sock = self._context.wrap_socket(self.sock, File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/ssl.py", line 513, in wrap_socket return self.sslsocket_class._create( File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/ssl.py", line 1071, in _create self.do_handshake() File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/ssl.py", line 1342, in do_handshake self._sslobj.do_handshake() ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:997)

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/Users/suhailalmarzouqi/Documents/echo360/echo360.py", line 7, in sys.exit(main()) File "/Users/suhailalmarzouqi/Documents/echo360/echo360/main.py", line 314, in main start_download_binary(binary_downloader, binary_type) File "/Users/suhailalmarzouqi/Documents/echo360/echo360/main.py", line 376, in start_download_binary binary_downloader.download() File "/Users/suhailalmarzouqi/Documents/echo360/echo360/binary_downloader/chromedriver.py", line 35, in download super(ChromedriverDownloader, self).download() File "/Users/suhailalmarzouqi/Documents/echo360/echo360/binary_downloader/downloader.py", line 58, in download wget.download(link, out="{0}/{1}".format(bin_path, filename)) File "/Users/suhailalmarzouqi/Documents/echo360/_echo360venv/lib/python3.10/site-packages/wget.py", line 526, in download (tmpfile, headers) = ulib.urlretrieve(binurl, tmpfile, callback) File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/urllib/request.py", line 241, in urlretrieve with contextlib.closing(urlopen(url, data)) as fp: File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/urllib/request.py", line 216, in urlopen return opener.open(url, data, timeout) File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/urllib/request.py", line 519, in open response = self._open(req, data) File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/urllib/request.py", line 536, in _open result = self._call_chain(self.handle_open, protocol, protocol + File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/urllib/request.py", line 496, in _call_chain result = func(*args) File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/urllib/request.py", line 1391, in https_open return self.do_open(http.client.HTTPSConnection, req, File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/urllib/request.py", line 1351, in do_open raise URLError(err) urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:997)>`

My university uses SSO, I am using this command ./run.sh https://echo360.org.uk/section/766ea09b-23e2-450d-9320-c05594d7652a/home --chrome --alternative_feeds -o ~/Desktop/Lectures (This is a private course)

soraxas commented 1 year ago

Doesn't seems related to this project.

Perhaps see this: https://stackoverflow.com/questions/52805115/certificate-verify-failed-unable-to-get-local-issuer-certificate

Suhail-SSRC commented 1 year ago

Thank you for pointing it out, this was the solution (in my case I was on a MacOS Ventura) pip install certifi CERT_PATH=$(python -m certifi) export SSL_CERT_FILE=${CERT_PATH} export REQUESTS_CA_BUNDLE=${CERT_PATH} It should then work perfectly