mirror of
https://github.com/searxng/searxng.git
synced 2025-08-01 01:22:22 +02:00
Flake8 and Twitter corrections
Lots of Flake8 corrections Maybe we should change the rule to allow lines of 120 chars. It seems more usable. Big twitter correction : now it outputs the words in right order...
This commit is contained in:
parent
576fdef440
commit
5d977056f7
13 changed files with 80 additions and 47 deletions
|
@ -69,11 +69,16 @@ def threaded_requests(requests):
|
|||
print('engine timeout: {0}'.format(th._engine_name))
|
||||
|
||||
|
||||
|
||||
# get default reqest parameter
|
||||
def default_request_params():
|
||||
return {
|
||||
'method': 'GET', 'headers': {}, 'data': {}, 'url': '', 'cookies': {}, 'verify': True}
|
||||
'method': 'GET',
|
||||
'headers': {},
|
||||
'data': {},
|
||||
'url': '',
|
||||
'cookies': {},
|
||||
'verify': True
|
||||
}
|
||||
|
||||
|
||||
# create a callback wrapper for the search engine results
|
||||
|
@ -487,14 +492,15 @@ class Search(object):
|
|||
continue
|
||||
|
||||
# append request to list
|
||||
requests.append((req, request_params['url'], request_args, selected_engine['name']))
|
||||
requests.append((req, request_params['url'],
|
||||
request_args,
|
||||
selected_engine['name']))
|
||||
|
||||
if not requests:
|
||||
return results, suggestions, answers, infoboxes
|
||||
# send all search-request
|
||||
threaded_requests(requests)
|
||||
|
||||
|
||||
while not results_queue.empty():
|
||||
engine_name, engine_results = results_queue.get_nowait()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue