獲取代理IP(proxy_pool)

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

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章