mirror of
https://github.com/searxng/searxng.git
synced 2025-12-24 04:30:02 +00:00
add initial support for offline engines && command engine
This commit is contained in:
@@ -225,6 +225,9 @@ def https_url_rewrite(result):
|
||||
|
||||
|
||||
def on_result(request, search, result):
|
||||
if 'parsed_url' not in result:
|
||||
return True
|
||||
|
||||
if result['parsed_url'].scheme == 'http':
|
||||
https_url_rewrite(result)
|
||||
return True
|
||||
|
||||
@@ -35,6 +35,9 @@ def get_doi_resolver(args, preference_doi_resolver):
|
||||
|
||||
|
||||
def on_result(request, search, result):
|
||||
if 'parsed_url' not in result:
|
||||
return True
|
||||
|
||||
doi = extract_doi(result['parsed_url'])
|
||||
if doi and len(doi) < 50:
|
||||
for suffix in ('/', '.pdf', '/full', '/meta', '/abstract'):
|
||||
|
||||
@@ -30,6 +30,9 @@ preference_section = 'privacy'
|
||||
|
||||
|
||||
def on_result(request, search, result):
|
||||
if 'parsed_url' not in result:
|
||||
return True
|
||||
|
||||
query = result['parsed_url'].query
|
||||
|
||||
if query == "":
|
||||
|
||||
Reference in New Issue
Block a user