Skip to content

Proxy環境での対応

hideki kuno edited this page Jul 29, 2020 · 1 revision
  • 環境変数を設定する
export http_proxy=http://192.168.127.1:8080
export https_proxy=http://192.168.127.1:8080
  • urllibの環境を確認する
python3
Python 3.6.9 (default, Jul 17 2020, 12:50:27)
[GCC 8.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import urllib.request
>>> urllib.request.getproxies()
{'https': 'http://192.168.33.4:8080', 'http': 'http://192.168.33.4:8080'}
>>>
Clone this wiki locally