diff --git a/morss/crawler.py b/morss/crawler.py index 90de263..a5d8707 100644 --- a/morss/crawler.py +++ b/morss/crawler.py @@ -8,7 +8,7 @@ try: from urllib2 import URLError from urllib2 import HTTPSHandler, BaseHandler, AbstractHTTPHandler, Request, addinfourl from httplib import HTTPException, HTTPConnection, HTTPS_PORT -except: +except ImportError: from io import StringIO from urllib.error import URLError from urllib.request import HTTPSHandler, BaseHandler, AbstractHTTPHandler, Request, addinfourl