Python mechanize doesn't work when HTTPS and Proxy Authentication required

不问归期 提交于 2019-11-30 23:07:50

I don't recommend you to use Mechanize, it's outdated. Take a look at requests it will make your life a lot easier. Using proxies with requests it's just this:

import requests

proxies = {
  "http": "10.10.1.10:3128",
  "https": "10.10.1.10:1080",
}

requests.get("http://example.org", proxies=proxies)
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!