mirror of
https://github.com/searxng/searxng.git
synced 2025-07-13 16:29:17 +02:00
Drop Python 2 (1/n): remove unicode string and url_utils
This commit is contained in:
parent
272158944b
commit
1022228d95
112 changed files with 388 additions and 535 deletions
|
@ -11,7 +11,7 @@
|
|||
"""
|
||||
|
||||
from json import loads, dumps
|
||||
from searx.utils import html_to_text
|
||||
from urllib.parse import html_to_text
|
||||
|
||||
# engine dependent config
|
||||
categories = ['science']
|
||||
|
@ -29,7 +29,7 @@ def request(query, params):
|
|||
params['url'] = search_url
|
||||
params['method'] = 'POST'
|
||||
params['headers']['Content-type'] = "application/json"
|
||||
params['data'] = dumps({"query": query.decode('utf-8'),
|
||||
params['data'] = dumps({"query": query.decode(),
|
||||
"searchField": "ALL",
|
||||
"sortDirection": "ASC",
|
||||
"sortOrder": "RELEVANCY",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue