#coding=utf-8
#公司网络只有连接vpn跳板机才能使用该模块
import urllib2
proxy_handler=urllib2.ProxyHandler({'http':'http://username:password@proxyhk.huawei.com:8080', 'https':'https:// username:password @proxyhk.huawei.com:8080'})
opener=urllib2.build_opener(proxy_handler)
urllib2.install_opener(opener)
req=urllib2.Request('http://www.baidu.com/')
conn=urllib2.urlopen(req)
print conn.read()

 

相关文章:

  • 2022-12-23
  • 2022-01-17
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-10-18
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-06
  • 2021-06-04
相关资源
相似解决方案