Germey 9 жил өмнө
parent
commit
2f3e11667d
1 өөрчлөгдсөн 4 нэмэгдсэн , 1 устгасан
  1. 4 1
      proxypool/schedule.py

+ 4 - 1
proxypool/schedule.py

@@ -2,7 +2,10 @@ import time
 from multiprocessing import Process
 import asyncio
 import aiohttp
-from aiohttp.errors import ProxyConnectionError
+try:
+    from aiohttp.errors import ProxyConnectionError
+except:
+    from aiohttp import  ClientProxyConnectionError as ProxyConnectionError
 from proxypool.db import RedisClient
 from proxypool.error import ResourceDepletionError
 from proxypool.getter import FreeProxyGetter