requests模块代理
import requests
proxy
= '127.0.0.1:1080'
proxies
= {
'http':'http://' + proxy
,
'https':'https://' + proxy
}
try:
respone
= requests
.get
('http://httpbin.rof/get',proxies
=proxies
)
print(respone
.text
)
except Exception
as e
:
print(e
)
后续爬虫,购买vps后再测试
转载请注明原文地址: https://lol.8miu.com/read-20681.html