From 1022228d950c2a809ed613df1a515d9a6cafda7c Mon Sep 17 00:00:00 2001 From: Dalf Date: Thu, 6 Aug 2020 17:42:46 +0200 Subject: Drop Python 2 (1/n): remove unicode string and url_utils --- searx/engines/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'searx/engines/base.py') diff --git a/searx/engines/base.py b/searx/engines/base.py index f1b1cf671..34b735b3c 100755 --- a/searx/engines/base.py +++ b/searx/engines/base.py @@ -13,10 +13,10 @@ More info on api: http://base-search.net/about/download/base_interface.pdf """ +from urllib.parse import urlencode from lxml import etree from datetime import datetime import re -from searx.url_utils import urlencode from searx.utils import searx_useragent -- cgit v1.2.3 From c225db45c8a4ab466bff049216f7e0189dc1b067 Mon Sep 17 00:00:00 2001 From: Dalf Date: Tue, 11 Aug 2020 16:25:03 +0200 Subject: Drop Python 2 (4/n): SearchQuery.query is a str instead of bytes --- searx/engines/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'searx/engines/base.py') diff --git a/searx/engines/base.py b/searx/engines/base.py index 34b735b3c..0114f9798 100755 --- a/searx/engines/base.py +++ b/searx/engines/base.py @@ -55,7 +55,7 @@ shorcut_dict = { def request(query, params): # replace shortcuts with API advanced search keywords for key in shorcut_dict.keys(): - query = re.sub(key, shorcut_dict[key], str(query)) + query = re.sub(key, shorcut_dict[key], query) # basic search offset = (params['pageno'] - 1) * number_of_results -- cgit v1.2.3