videocamWeb Data Extraction Summit - September 30th, 2021.
Join some of the greatest minds in web scraping to educate, inspire, and innovate.
Register for free!
Start a new topic

Error using proxy to connect to https site

  

import requests

url = "https://www.google.com"
proxy_host = "proxy.crawlera.com"
proxy_port = "8010"
proxy_auth = "***:" # 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)}

header = {
    "User-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.132 Safari/537.36"
}

r = requests.get(url, proxies=proxies, verify=r'E:\python\www\test\ssl_file\crawlera-ca.crt')

  

image

Login to post a comment