python3中proxyhandler在哪
发布网友
发布时间:2022-04-14 08:12
我来回答
共2个回答
热心网友
时间:2022-04-14 09:42
代码:
#coding=utf8
import urllib2
proxy = urllib2.ProxyHandler({'http': '127.0.0.1:8087'})
opener = urllib2.build_opener(proxy)
urllib2.install_opener(opener)
response = urllib2.urlopen('http://feeds2.feedburner.com/MobileOrchard')
print response.read()
热心网友
时间:2022-04-14 11:00
python3代码如下:
import urllib.request-----(导入)
httpproxy_handler = urllib.request.ProxyHandler({"http" : "203.174.112.13:3128"})