I use Python 2.7.2 and Mechanize 0.2.5.
When I access the Internet, I have to go through a proxy server. I wrote the following codes, but an URLError occurred at the las
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)