mirror of
https://github.com/searxng/searxng.git
synced 2025-08-01 01:22:22 +02:00
[enh] py3 compatibility
This commit is contained in:
parent
46a2c63f8e
commit
52e615dede
115 changed files with 517 additions and 513 deletions
|
@ -16,8 +16,8 @@ along with searx. If not, see < http://www.gnu.org/licenses/ >.
|
|||
'''
|
||||
|
||||
import gc
|
||||
import sys
|
||||
import threading
|
||||
from thread import start_new_thread
|
||||
from time import time
|
||||
from uuid import uuid4
|
||||
import requests.exceptions
|
||||
|
@ -33,6 +33,14 @@ from searx import logger
|
|||
from searx.plugins import plugins
|
||||
from searx.exceptions import SearxParameterException
|
||||
|
||||
try:
|
||||
from thread import start_new_thread
|
||||
except:
|
||||
from _thread import start_new_thread
|
||||
|
||||
if sys.version_info[0] == 3:
|
||||
unicode = str
|
||||
|
||||
logger = logger.getChild('search')
|
||||
|
||||
number_of_searches = 0
|
||||
|
@ -387,7 +395,7 @@ class Search(object):
|
|||
request_params['time_range'] = search_query.time_range
|
||||
|
||||
# append request to list
|
||||
requests.append((selected_engine['name'], search_query.query.encode('utf-8'), request_params))
|
||||
requests.append((selected_engine['name'], search_query.query, request_params))
|
||||
|
||||
# update timeout_limit
|
||||
timeout_limit = max(timeout_limit, engine.timeout)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue