python搭建代理,获取,保存,读取cookies
下面是添加代理与获取cookies的方法,以https://www.baidu.com为例在爬虫是免不了要使用代理,下面是添加代理的方法from urllib.error import URLErrorfrom urllib.request import ProxyHandler, build_openerproxy_handler = ProxyHandler({ 'http':'http://127.0.0.1:9743', 'https':'https://127.0.0.1
原创
2021-07-31 16:55:34 ·
230 阅读 ·
0 评论