用免费代理ip试了一下,结果报错MaxRetryError("HTTPSConnectionPool……
import requests
proxy = '60.28.38.132:80'
proxies = {
'http': 'http://' + proxy,
'https': 'https://' +proxy
}
try:
res = requests.get('https://www.baidu.com', proxies=proxies)
print(res.text)
except requests.exceptions.ConnectionError as e:
print('Error', e.args)
本地使用xx软件就可以连接外网了
github找个代理池,开源的很多