LoginSignup
1
0

More than 5 years have passed since last update.

[Python] urllib2使用時のproxy設定

Last updated at Posted at 2018-02-10

概要

urllib2使用時のプロキシ設定方法の一例です。

用例

def setProxy():
    proxy = urllib2.ProxyHandler({'http': 'http://{PROXY_HOST}:{PORT}'})
    opener = urllib2.build_opener(proxy)
    urllib2.install_opener(opener)
1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0