lorenzodifuccia / safaribooks

Download and generate EPUB of your favorite books from O'Reilly Learning (aka Safari Books Online) library.
Do What The F*ck You Want To Public License
4.61k stars 684 forks source link

SSL Cert Verification Error #310

Closed Bhuvan988 closed 2 years ago

Bhuvan988 commented 2 years ago

[-] Logging into Safari Books Online... [#] HTTPSConnectionPool(host='learning.oreilly.com', port=443): Max retries exceeded with url: /login/unified/?next=/home/ (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1125)'))) [#] Login: unable to reach Safari Books Online. Try again... [!] Aborting... How to solve this issue?

rufanov commented 2 years ago

It's problem with your system and/or your python - by some reason, there is no issuer certificate installed for certificate retrieved from O'Reilly site. Maybe you use some weird custom python build which don't use system certificate store, maybe some app/proxy use MITM-attack to sniff and modify your network traffic - you should fix this problem.

As quick workaround you can edit safaribooks.py and put self.session.verify = False to somewhere near start of SafariBooks.__init__() function to disable SSL-certificate verification.

Bhuvan988 commented 2 years ago

I found reason for it. My system was installed with zscaler. Worked well with other system.