Created
April 8, 2020 08:12
-
-
Save zhangzhhz/a310fcea3ea4a5c0d3e246a3faa28b16 to your computer and use it in GitHub Desktop.
python program or PIP accessing internet via proxy
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Set environment variables for proxies. | |
Windows: | |
set http_proxy=http://xxx.xxx.xxx.xxx:80 | |
set https_proxy=http://xxx.xxx.xxx.xxx:80 | |
Bash: | |
http_proxy=http://xxx.xxx.xxx.xxx:80 | |
https_proxy=http://xxx.xxx.xxx.xxx:80 | |
References: | |
https://blog.scrapinghub.com/python-requests-proxy | |
https://msal-python.readthedocs.io/en/latest/ | |
PIP configuration: | |
``` | |
[global] | |
proxy = http://xxx.xxx.xxx.xxx:80 | |
``` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment