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/plugins/https_rewrite.py | |
parent | 46a2c63f8e1c3819cceff2d61fe9106051e8ecee (diff) | |
download | searxng-52e615dede8538c36f569d2cf07835427a9a0db6.tar.gz searxng-52e615dede8538c36f569d2cf07835427a9a0db6.zip |
[enh] py3 compatibility
Diffstat (limited to 'searx/plugins/https_rewrite.py')
-rw-r--r-- | searx/plugins/https_rewrite.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/searx/plugins/https_rewrite.py b/searx/plugins/https_rewrite.py index 8b4c9784e..4462c86bc 100644 --- a/searx/plugins/https_rewrite.py +++ b/searx/plugins/https_rewrite.py @@ -16,14 +16,17 @@ along with searx. If not, see < http://www.gnu.org/licenses/ >. ''' import re -from urlparse import urlparse +import sys from lxml import etree from os import listdir, environ from os.path import isfile, isdir, join from searx.plugins import logger from flask_babel import gettext from searx import searx_dir +from searx.url_utils import urlparse +if sys.version_info[0] == 3: + unicode = str name = "HTTPS rewrite" description = gettext('Rewrite HTTP links to HTTPS if possible') |