haipproxy icon indicating copy to clipboard operation
haipproxy copied to clipboard

python客户端调用示例 报错!

Open suyinLoong opened this issue 5 years ago • 1 comments

使用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

该怎么办?

suyinLoong avatar Mar 02 '21 13:03 suyinLoong

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

xpgege avatar Sep 14 '21 03:09 xpgege