import requests
url = 'http://httpbin.org/ip'
# 建立代理IP的字典,传入参数proxies
proxy = {
'http': '114.104.128.23'
}
resq = requests.get(url, proxies=proxy)
print(resq.text)
市场调查与分析-requests库 使用代理ip
于 2020-12-20 17:13:27 首次发布
import requests
url = 'http://httpbin.org/ip'
# 建立代理IP的字典,传入参数proxies
proxy = {
'http': '114.104.128.23'
}
resq = requests.get(url, proxies=proxy)
print(resq.text)