浏览代码

update bug

Germey 8 年之前
父节点
当前提交
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