diff options
author | Adam Tauber <asciimoo@gmail.com> | 2016-11-30 18:43:03 +0100 |
---|---|---|
committer | Adam Tauber <asciimoo@gmail.com> | 2017-05-15 12:02:30 +0200 |
commit | 52e615dede8538c36f569d2cf07835427a9a0db6 (patch) | |
tree | ac65990c72156def2d49e81d981f0b3beda4fd2e /searx/url_utils.py | |
parent | 46a2c63f8e1c3819cceff2d61fe9106051e8ecee (diff) | |
download | searxng-52e615dede8538c36f569d2cf07835427a9a0db6.tar.gz searxng-52e615dede8538c36f569d2cf07835427a9a0db6.zip |
[enh] py3 compatibility
Diffstat (limited to 'searx/url_utils.py')
-rw-r--r-- | searx/url_utils.py | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/searx/url_utils.py b/searx/url_utils.py new file mode 100644 index 000000000..e9919ab30 --- /dev/null +++ b/searx/url_utils.py @@ -0,0 +1,28 @@ +from sys import version_info + +if version_info[0] == 2: + from urllib import quote, quote_plus, unquote, urlencode + from urlparse import parse_qsl, urljoin, urlparse, urlunparse, ParseResult +else: + from urllib.parse import ( + parse_qsl, + quote, + quote_plus, + unquote, + urlencode, + urljoin, + urlparse, + urlunparse, + ParseResult + ) + + +__export__ = (parse_qsl, + quote, + quote_plus, + unquote, + urlencode, + urljoin, + urlparse, + urlunparse, + ParseResult) |