Skip to content

Commit

Permalink
fix docip bug & add support for python 3.11 (#205)
Browse files Browse the repository at this point in the history
  • Loading branch information
B1ACK917 authored Dec 26, 2023
1 parent 2344ee1 commit 97229e6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
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

0 comments on commit 97229e6

Please sign in to comment.