summaryrefslogtreecommitdiff
path: root/searx/plugins/oa_doi_rewrite.py
diff options
context:
space:
mode:
authorNoémi Ványi <sitbackandwait@gmail.com>2019-09-23 17:14:32 +0200
committerNoémi Ványi <sitbackandwait@gmail.com>2019-10-16 15:52:48 +0200
commita6f20caf32af463b57a026ee7cb7ed6317db6b8b (patch)
treec180f804d1a80767ab50b7cffb42aa75f9c3806a /searx/plugins/oa_doi_rewrite.py
parent2946c5f10695634be1f1266142bec5572139085f (diff)
downloadsearxng-a6f20caf32af463b57a026ee7cb7ed6317db6b8b.tar.gz
searxng-a6f20caf32af463b57a026ee7cb7ed6317db6b8b.zip
add initial support for offline engines && command engine
Diffstat (limited to 'searx/plugins/oa_doi_rewrite.py')
-rw-r--r--searx/plugins/oa_doi_rewrite.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/searx/plugins/oa_doi_rewrite.py b/searx/plugins/oa_doi_rewrite.py
index d4942498f..be80beb26 100644
--- a/searx/plugins/oa_doi_rewrite.py
+++ b/searx/plugins/oa_doi_rewrite.py
@@ -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'):