我对 python mechanize 的代理支持有疑问。我正在制作一些网络客户端脚本,我想在我的脚本中插入代理支持功能。
例如,如果我有:
params = urllib.urlencode({'id':id, 'passwd':pw})
rq = mechanize.Request('http://www.example.com', params)
rs = mechanize.urlopen(rq)
如何将代理支持添加到我的机械化脚本中?每当我打开这个www.example.com
网站时,我都希望它通过代理。