File tree 3 files changed +3
-3
lines changed
3 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ def parse(self, html):
25
25
proxy_list = result ['data' ]
26
26
for proxy_item in proxy_list :
27
27
host = proxy_item ['ip' ]
28
- port = proxy_item [ 'port' ]
28
+ port = host . split ( ':' )[ - 1 ]
29
29
yield Proxy (host = host , port = port )
30
30
except json .JSONDecodeError :
31
31
print ("json.JSONDecodeError" )
Original file line number Diff line number Diff line change @@ -82,7 +82,7 @@ def run(self):
82
82
logger .debug (f'testing proxies use cursor { cursor } , count { TEST_BATCH } ' )
83
83
cursor , proxies = self .redis .batch (cursor , count = TEST_BATCH )
84
84
if proxies :
85
- tasks = [self .test (proxy ) for proxy in proxies ]
85
+ tasks = [self .loop . create_task ( self . test (proxy ) ) for proxy in proxies ]
86
86
self .loop .run_until_complete (asyncio .wait (tasks ))
87
87
if not cursor :
88
88
break
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ redis>=3.5.3,<4.0.0
11
11
lxml >= 4.6.5 ,< 5.0.0
12
12
fake_headers >= 1.0.2 ,< 2.0.0
13
13
maxminddb_geolite2 == 2018.703
14
- gevent >= 21.8.0 ,< 22 .0.0
14
+ gevent >= 21.8.0 ,< 24 .0.0
15
15
tornado >= 6.0 ,< 7.0
16
16
itsdangerous == 0.24
17
17
MarkupSafe < 2.1.0
You can’t perform that action at this time.
0 commit comments