#代理使用
>>> 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:'天津市 电信'}

 

相关文章:

  • 2022-12-23
  • 2021-08-18
  • 2022-12-23
  • 2021-07-27
  • 2021-10-28
  • 2022-12-23
  • 2022-01-08
  • 2021-06-26
猜你喜欢
  • 2021-11-15
  • 2022-12-23
  • 2022-12-23
  • 2021-06-17
  • 2022-02-02
  • 2021-11-20
  • 2022-12-23
相关资源
相似解决方案