summaryrefslogtreecommitdiff
path: root/searx/engines/gentoo.py
diff options
context:
space:
mode:
authorDalf <alex@al-f.net>2020-08-06 17:42:46 +0200
committerAlexandre Flament <alex@al-f.net>2020-09-10 10:39:04 +0200
commit1022228d950c2a809ed613df1a515d9a6cafda7c (patch)
treed792dddea1a5b278b018ed4e024cd13340d5c1b1 /searx/engines/gentoo.py
parent272158944bf13503e2597018fc60a00baddec660 (diff)
Drop Python 2 (1/n): remove unicode string and url_utils
Diffstat (limited to 'searx/engines/gentoo.py')
-rw-r--r--searx/engines/gentoo.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/searx/engines/gentoo.py b/searx/engines/gentoo.py
index a7a966cc9..b4b02e6b4 100644
--- a/searx/engines/gentoo.py
+++ b/searx/engines/gentoo.py
@@ -11,9 +11,9 @@
@parse url, title
"""
+from urllib.parse import urlencode, urljoin
from lxml import html
from searx.engines.xpath import extract_text
-from searx.url_utils import urlencode, urljoin
# engine dependent config
categories = ['it']
@@ -90,7 +90,7 @@ def request(query, params):
# if our language is hosted on the main site, we need to add its name
# to the query in order to narrow the results to that language
if language in main_langs:
- query += b' (' + (main_langs[language]).encode('utf-8') + b')'
+ query += b' (' + (main_langs[language]).encode() + b')'
# prepare the request parameters
query = urlencode({'search': query})