except ImportError: # Python 2
import urllib as compat_urllib_parse
+try:
+ from urllib.parse import urlparse as compat_urllib_parse_urlparse
+except ImportError: # Python 2
+ from urlparse import urlparse as compat_urllib_parse_urlparse
+
try:
import http.cookiejar as compat_cookiejar
except ImportError: # Python 2