-----------
---------------------------------------------------------------------------------------------------------------------------------------------
IP代理的方式
免费代理IP : https://www.xicidaili.com/nn/
大象代理 :收费 http://www.daxiangdaili.com/
快代理:收费 https://www.kuaidaili.com/
---------------------------------------------------------------------------------------
from urllib.request import build_opener from urllib.request import ProxyHandler proxy=ProxyHandler({'http':'60.2.44.182:30963'})#使用代理ip opener=build_opener(proxy) url='https://www.xslou.com/' resp=opener.open(url) print(resp.read().decode('gbk'))
标签:www,IP,代理,3.5,opener,https,com From: https://www.cnblogs.com/988MQ/p/17044991.html