XIAORUI YU
Results
1
comments of
XIAORUI YU
@gsoec 用py_cli.py里面的ProxyFetcher,不到10行代码就可以实现。 ```python from haipporoxy.client import ProxyFetcher class CustomProxyMiddleware(HttpProxyMiddleware): fetcher = ProxyFetcher('zhihu', strategy='greedy', length=5) def process_request(self, request, spider): proxy = self.fetcher.get_proxy() print "**************ProxyMiddleware no pass************" + proxy request.meta['proxy'] = self.fetcher.get_proxy()...