Using crawlera with python requests on MacOS

Posted almost 4 years ago by Kyösti Kurikka

Post a topic
Un Answered
K
Kyösti Kurikka

I installed the crawlera certificate and it shows up in my Keychain Access app under the system keychain as a trusted certificate. I can't access any https-site with my code which worked perfectly fine a year ago.


For example:

url = "https://www.scrapinghub.com"

proxy_port = "8010"

proxy_host = "proxy.crawlera.com"

proxy_auth = "<MY API KEY>:" # Make sure to include ':' at the end

proxies = {"https": "https://{}@{}:{}/".format(proxy_auth, proxy_host, proxy_port),

"http": "http://{}@{}:{}/".format(proxy_auth, proxy_host, proxy_port)}


r = requests.get(url, proxies=proxies, verify=False)

r.text


Throws an error:

ssl.SSLError: [SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:833)


1 Votes


0 Comments

Login to post a comment