SpiderClub / haipproxy

:sparkling_heart: High available distributed ip proxy pool, powerd by Scrapy and Redis
https://spiderclub.github.io/haipproxy/
MIT License
5.43k stars 914 forks source link

python客户端调用示例 报错! #118

Open suyin-long opened 3 years ago

suyin-long commented 3 years ago

使用python客户端调用示例:

from client.py_cli import ProxyFetcher
args = dict(host='127.0.0.1', port=6379, password='123456', db=0)
# 这里`zhihu`的意思是,去和`zhihu`相关的代理ip校验队列中获取ip
# 这么做的原因是同一个代理IP对不同网站代理效果不同
fetcher = ProxyFetcher('zhihu', strategy='greedy', redis_args=args)
# 获取一个可用代理
print(fetcher.get_proxy())
# 获取可用代理列表
print(fetcher.get_proxies()) # or print(fetcher.pool)

报错: ModuleNotFoundError: No module named 'client' 然后使用命令: pip install client 安装client报错:

ERROR: Could not find a version that satisfies the requirement client
ERROR: No matching distribution found for client

该怎么办?

xpgege commented 3 years ago

这里的client是项目的client文件夹的py_cli.py文件吧