0

I read the docs, googled, and the only thing i could find was:

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

which seems to indicate it is not possible. I would rather not go dig through another library, does anybody know if this is possible?

Community
  • 1
  • 1
Solaxun
  • 2,732
  • 1
  • 22
  • 41

1 Answers1

1

you can set HTTPS proxy in mechanize like this.

import mechanize
url = 'https://www.hostname.com/'
br = mechanize.Browser()
br.set_proxies({"http":"username:passwd@X.X.X.X:port",
                "https":"username:passwd@X.X.X.X:port"})
br.set_handled_schemes(['http', 'https'])
br.open(url)
Rachit Tayal
  • 1,190
  • 14
  • 20