我的代理/程序无法工作/更新?Python 3.4

我的代理/程序无法工作/更新?Python 3.4,python,proxy,Python,Proxy,我是这个社区的新手 这是我的 import urllib.request 然后我用testip和testpip在Shell中进行测试, 和ip地址匹配 他们应该这么做!匹配找到了解决方案!从urllib.request导入urllib.request导入请求,urlopen proxy={“http”:“http://“proxyhere”:8081'}proxy\u support=urllib.request.ProxyHandler(proxies=proxy)opener=urllib

我是这个社区的新手 这是我的

import urllib.request
然后我用
testip
testpip
在Shell中进行测试, 和ip地址匹配


他们应该这么做!匹配

找到了解决方案!从urllib.request导入urllib.request导入请求,urlopen proxy={“http”:“http://“proxyhere”:8081'}proxy\u support=urllib.request.ProxyHandler(proxies=proxy)opener=urllib.request.build\u opener(proxy\u support)urllib.request.install\u opener(opener)getip=urlopen(“#最后它返回一个新的IPF来找到解决方案!从urllib.request导入urllib.request,urlopen proxy={“http”:“http://“proxyhere”:8081'}proxy\u support=urllib.request.ProxyHandler(proxies=proxy)opener=urllib.request.build\u opener(proxy\u support)urllib.request.install\u opener(opener)getip=urlopen(“#最后返回一个新的ip
proxy= urllib.request.ProxyHandler({"http" : 'http://'removed for SF':'same'})

testip=urllib.request.urlopen('http://httpbin.org/ip').read()

testpip=urllib.request.urlopen('http://httpbin.org/ip', proxies=proxy).read()