我不建议您使用Mechanize,它已经过时了。看一下请求,它将使您的生活更加轻松。使用带有请求的代理就是这样:
import requestsproxies = { "http": "10.10.1.10:3128", "https": "10.10.1.10:1080",}requests.get("http://example.org", proxies=proxies)
我不建议您使用Mechanize,它已经过时了。看一下请求,它将使您的生活更加轻松。使用带有请求的代理就是这样:
import requestsproxies = { "http": "10.10.1.10:3128", "https": "10.10.1.10:1080",}requests.get("http://example.org", proxies=proxies)