Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion proxypool/crawlers/public/docip.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def parse(self, html):
proxy_list = result['data']
for proxy_item in proxy_list:
host = proxy_item['ip']
port = proxy_item['port']
port = host.split(':')[-1]
yield Proxy(host=host, port=port)
except json.JSONDecodeError:
print("json.JSONDecodeError")
Expand Down
2 changes: 1 addition & 1 deletion proxypool/processors/tester.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def run(self):
logger.debug(f'testing proxies use cursor {cursor}, count {TEST_BATCH}')
cursor, proxies = self.redis.batch(cursor, count=TEST_BATCH)
if proxies:
tasks = [self.test(proxy) for proxy in proxies]
tasks = [self.loop.create_task(self.test(proxy)) for proxy in proxies]
self.loop.run_until_complete(asyncio.wait(tasks))
if not cursor:
break
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ redis>=3.5.3,<4.0.0
lxml>=4.6.5,<5.0.0
fake_headers>=1.0.2,<2.0.0
maxminddb_geolite2==2018.703
gevent>=21.8.0,<22.0.0
gevent>=21.8.0,<24.0.0
tornado>=6.0,<7.0
itsdangerous==0.24
MarkupSafe<2.1.0