2013-04-21 13:42:33 +02:00
|
|
|
# ex:ts=4:sw=4:sts=4:et
|
|
|
|
# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
|
|
|
|
|
|
|
|
# Pylint does not seem to handle conditional imports
|
|
|
|
# pylint: disable=F0401
|
|
|
|
# pylint: disable=W0611
|
|
|
|
|
|
|
|
from __future__ import absolute_import
|
2013-12-30 01:35:08 +01:00
|
|
|
from svtplay_dl.utils import is_py3
|
|
|
|
if is_py3:
|
2013-04-21 13:42:33 +02:00
|
|
|
# pylint: disable=E0611
|
2014-02-08 16:41:55 +01:00
|
|
|
from urllib.parse import quote, unquote_plus, quote_plus, urlparse, parse_qs
|
2013-04-21 13:42:33 +02:00
|
|
|
from urllib.request import urlopen, Request, build_opener, \
|
|
|
|
HTTPCookieProcessor, HTTPRedirectHandler
|
|
|
|
from urllib.error import HTTPError, URLError
|
|
|
|
from urllib.response import addinfourl
|
|
|
|
from http.cookiejar import CookieJar, Cookie
|
|
|
|
else:
|
2014-02-08 16:41:55 +01:00
|
|
|
from urllib import addinfourl, quote, unquote_plus, quote_plus
|
2013-04-21 13:42:33 +02:00
|
|
|
from urlparse import urlparse, parse_qs
|
|
|
|
from urllib2 import urlopen, Request, HTTPError, URLError, build_opener, \
|
|
|
|
HTTPCookieProcessor, HTTPRedirectHandler
|
|
|
|
from cookielib import CookieJar, Cookie
|