summaryrefslogtreecommitdiff
path: root/searx/autocomplete.py
diff options
context:
space:
mode:
Diffstat (limited to 'searx/autocomplete.py')
-rw-r--r--searx/autocomplete.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/searx/autocomplete.py b/searx/autocomplete.py
index b360af9f6..de0623a8a 100644
--- a/searx/autocomplete.py
+++ b/searx/autocomplete.py
@@ -18,7 +18,6 @@ along with searx. If not, see < http://www.gnu.org/licenses/ >.
from lxml import etree
from json import loads
-from urllib import urlencode
from searx import settings
from searx.languages import language_codes
from searx.engines import (
@@ -26,6 +25,11 @@ from searx.engines import (
)
from searx.poolrequests import get as http_get
+try:
+ from urllib import urlencode
+except:
+ from urllib.parse import urlencode
+
def get(*args, **kwargs):
if 'timeout' not in kwargs: