|
|
il y a 6 ans | |
|---|---|---|
| examples | il y a 6 ans | |
| proxypool | il y a 7 ans | |
| .gitignore | il y a 9 ans | |
| LICENSE | il y a 9 ans | |
| README.md | il y a 8 ans | |
| importer.py | il y a 8 ans | |
| proxy provider.txt | il y a 8 ans | |
| requirements.txt | il y a 9 ans | |
| run.py | il y a 8 ans |
至少Python3.5以上
安装好之后将Redis服务开启
cd proxypool
进入proxypool目录,修改settings.py文件
PASSWORD为Redis密码,如果为空,则设置为None
pip3 install -r requirements.txt
python3 run.py
利用requests获取方法如下
import requests
PROXY_POOL_URL = 'http://localhost:5555/random'
def get_proxy():
try:
response = requests.get(PROXY_POOL_URL)
if response.status_code == 200:
return response.text
except ConnectionError:
return None