代理
代码
找一个可以用的ip然后加入代理 用代理ip去访问
import requests
# 114.255.132.60:3128
proxies ={
"https":"http://114.255.132.60:3128"
}
response = requests.get("http://www.baidu.com/",proxies=proxies)
response.encoding = 'utf-8'
print(response.text)
笔记
原理: 通过第三方的一个机器去发送请求
当你的IP被网址拉黑后 你利用别的ip去发送请求 多个代理 处于幕后