2023-12-15 22:10:49 2023-12-15 14:10:49.504 | ERROR | proxypool.scheduler:run_getter:49 - An error has been caught in function 'run_getter', process 'MainProcess' (9), thread 'MainThread' (139905923353416):
2023-12-15 22:10:49 Traceback (most recent call last):
2023-12-15 22:10:49
2023-12-15 22:10:49 File "run.py", line 12, in <module>
2023-12-15 22:10:49 getattr(Scheduler(), f'run_{args.processor}')()
2023-12-15 22:10:49 └ <class 'proxypool.scheduler.Scheduler'>
2023-12-15 22:10:49
2023-12-15 22:10:49 > File "/app/proxypool/scheduler.py", line 49, in run_getter
2023-12-15 22:10:49 getter.run()
2023-12-15 22:10:49 │ └ <function Getter.run at 0x7f3e60e27830>
2023-12-15 22:10:49 └ <proxypool.processors.getter.Getter object at 0x7f3e5ffbcf90>
2023-12-15 22:10:49
2023-12-15 22:10:49 File "/app/proxypool/processors/getter.py", line 37, in run
2023-12-15 22:10:49 for proxy in crawler.crawl():
2023-12-15 22:10:49 │ └ <function BaseCrawler.crawl at 0x7f3e60a13710>
2023-12-15 22:10:49 └ <public.docip.DocipCrawler object at 0x7f3e5fb7ca50>
2023-12-15 22:10:49
2023-12-15 22:10:49 File "/app/proxypool/crawlers/base.py", line 45, in crawl
2023-12-15 22:10:49 yield from self.process(html, url)
2023-12-15 22:10:49 │ │ │ └ 'https://www.docip.net/data/free.json?t=20231215'
2023-12-15 22:10:49 │ │ └ '{"time": 1702630619, "data": [{"ip": "39.106.60.216:3128", "addr": "\\u4e2d\\u56fd \\u5317\\u4eac \\u5317\\u4eac\\u5e02", "p...
2023-12-15 22:10:49 │ └ <function BaseCrawler.process at 0x7f3e60a10710>
2023-12-15 22:10:49 └ <public.docip.DocipCrawler object at 0x7f3e5fb7ca50>
2023-12-15 22:10:49
2023-12-15 22:10:49 File "/app/proxypool/crawlers/base.py", line 30, in process
2023-12-15 22:10:49 for proxy in self.parse(html):
2023-12-15 22:10:49 │ │ └ '{"time": 1702630619, "data": [{"ip": "39.106.60.216:3128", "addr": "\\u4e2d\\u56fd \\u5317\\u4eac \\u5317\\u4eac\\u5e02", "p...
2023-12-15 22:10:49 │ └ <function DocipCrawler.parse at 0x7f3e60a28cb0>
2023-12-15 22:10:49 └ <public.docip.DocipCrawler object at 0x7f3e5fb7ca50>
2023-12-15 22:10:49
2023-12-15 22:10:49 File "/app/proxypool/crawlers/public/docip.py", line 28, in parse
2023-12-15 22:10:49 port = proxy_item['port']
2023-12-15 22:10:49 └ {'ip': '39.106.60.216:3128', 'addr': '中国 北京 北京市', 'proxy_type': '2'}
2023-12-15 22:10:49
2023-12-15 22:10:49 KeyError: 'port'
2023-12-15 22:11:09 2023-12-15 14:11:09.444 | DEBUG | proxypool.scheduler:run_tester:33 - tester loop 33 start...
2023-12-15 22:11:09 2023-12-15 14:11:09.444 | INFO | proxypool.processors.tester:run:77 - stating tester...
2023-12-15 22:11:09 2023-12-15 14:11:09.445 | DEBUG | proxypool.processors.tester:run:79 - 0 proxies to test
2023-12-15 22:11:09 2023-12-15 14:11:09.445 | DEBUG | proxypool.processors.tester:run:82 - testing proxies use cursor 0, count 20
docker logs 如下:
会一直重复这个过程,导致无法获取到代理