diff options
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) |