04 代理池的搭建

代理池搭建

一、直接从git上下载免费开源的代码

git clone git@github.com:jhao104/proxy_pool.git

二、打开修改配置

reids地址修改

三、启动爬虫

python proxyPool.py schedule

四、启动服务

python3 proxyPool.py server
# 随机获取一个代理
requests.get("http://127.0.0.1:5010/get/").json()
# 删除一个代理
requests.get("http://127.0.0.1:5010/delete/?proxy={}".format(proxy))
原文地址:https://www.cnblogs.com/bailongcaptain/p/13440598.html