https://github.com/jhao104/proxy_pool
- download and upload the code
https://github.com/jhao104/proxy_pool/releases 下载对应zip文件
- change the path and install the requirments
pip install -r requirements.txt
- set the basic infomation
It seemend that the HOST should not be changed,and the PORT need to be opened.
# setting.py 为项目配置文件
# 配置API服务
HOST = "0.0.0.0" # IP
PORT = 5000 # 监听端口
# 配置数据库
DB_CONN = 'redis://:[email protected]:8888/0'
# 配置 ProxyFetcher
PROXY_FETCHER = [
"freeProxy01", # 这里是启用的代理抓取方法名,所有fetch方法位于fetcher/proxyFetcher.py
"freeProxy02",
# ....
]
- start it
# 如果已经具备运行条件, 可用通过proxyPool.py启动。
# 程序分为: schedule 调度程序 和 server Api服务
# 启动调度程序
python proxyPool.py schedule
# 启动webApi服务
python proxyPool.py server
- visit it at
http://ip:port