#代理使用 >>> proxy_handler=urllib.request.ProxyHandler({'http':'211.81.31.18:8081'}) >>> opener=urllib.request.build_opener(proxy_handler) >>> urllib.request.install_opener(opener) >>> page=urlopen('http://ip.chinaz.com/getip.aspx') >>> print(page.read().decode('utf-8')) {ip:'221.238.67.231',address:'天津市 电信'}