File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ def parse(self, html):
2525 proxy_list = result ['data' ]
2626 for proxy_item in proxy_list :
2727 host = proxy_item ['ip' ]
28- port = proxy_item [ 'port' ]
28+ port = host . split ( ':' )[ - 1 ]
2929 yield Proxy (host = host , port = port )
3030 except json .JSONDecodeError :
3131 print ("json.JSONDecodeError" )
Original file line number Diff line number Diff line change @@ -82,7 +82,7 @@ def run(self):
8282 logger .debug (f'testing proxies use cursor { cursor } , count { TEST_BATCH } ' )
8383 cursor , proxies = self .redis .batch (cursor , count = TEST_BATCH )
8484 if proxies :
85- tasks = [self .test (proxy ) for proxy in proxies ]
85+ tasks = [self .loop . create_task ( self . test (proxy ) ) for proxy in proxies ]
8686 self .loop .run_until_complete (asyncio .wait (tasks ))
8787 if not cursor :
8888 break
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ redis>=3.5.3,<4.0.0
1111lxml >= 4.6.5 ,< 5.0.0
1212fake_headers >= 1.0.2 ,< 2.0.0
1313maxminddb_geolite2 == 2018.703
14- gevent >= 21.8.0 ,< 22 .0.0
14+ gevent >= 21.8.0 ,< 24 .0.0
1515tornado >= 6.0 ,< 7.0
1616itsdangerous == 0.24
1717MarkupSafe < 2.1.0
You can’t perform that action at this time.
0 commit comments