1.首先拉取代码
https://github.com/jhao104/proxy_pool.git
2.配置py环境:
pip install -r requirements.txt
配置配置文件(redis)(Config中)
DB_TYPE = getenv('db_type', 'REDIS').upper()
DB_HOST = getenv('db_host', '127.0.0.1')
DB_PORT = getenv('db_port', '6379')
DB_PASSWORD = getenv('db_password', '')
3.运行(cli)
# 首先启动调度程序
>>>python proxyPool.py schedule
# 然后启动webApi服务
>>>python proxyPool.py webserver
如果出现lxml不可用的情况,则运行
pip3 install lxml-4.2.1-cp37-cp37m-win_amd64.whl
lxml-4.2.1-cp37-cp37m-win_amd64.whl
github地址:https://github.com/jhao104/proxy_pool