summaryrefslogtreecommitdiff
path: root/searx
diff options
context:
space:
mode:
authorAdam Tauber <asciimoo@gmail.com>2018-08-19 13:14:53 +0200
committerGitHub <noreply@github.com>2018-08-19 13:14:53 +0200
commit19f18a263853136731ef7b6091ae58d4fdb9db19 (patch)
treefa37d1835996ca3d3a628bbbe6fe480dbe4fb2ca /searx
parent74cc2610712ed3cee2c78b6417f73888c5216d1e (diff)
parentc2c7394718ba45ff20f11d741e9654bd36cd98c3 (diff)
downloadsearxng-19f18a263853136731ef7b6091ae58d4fdb9db19.tar.gz
searxng-19f18a263853136731ef7b6091ae58d4fdb9db19.zip
Merge pull request #1360 from Popolon/master
get_doi_resolver return doi resolver url instead of doi resolver name
Diffstat (limited to 'searx')
-rw-r--r--searx/plugins/oa_doi_rewrite.py3
-rw-r--r--searx/settings.yml1
2 files changed, 3 insertions, 1 deletions
diff --git a/searx/plugins/oa_doi_rewrite.py b/searx/plugins/oa_doi_rewrite.py
index f558bf695..d4942498f 100644
--- a/searx/plugins/oa_doi_rewrite.py
+++ b/searx/plugins/oa_doi_rewrite.py
@@ -30,7 +30,8 @@ def get_doi_resolver(args, preference_doi_resolver):
doi_resolver = args.get('doi_resolver', preference_doi_resolver)[0]
if doi_resolver not in doi_resolvers:
doi_resolvers = settings['default_doi_resolver']
- return doi_resolver
+ doi_resolver_url = doi_resolvers[doi_resolver]
+ return doi_resolver_url
def on_result(request, search, result):
diff --git a/searx/settings.yml b/searx/settings.yml
index de56eda08..0c6f642fc 100644
--- a/searx/settings.yml
+++ b/searx/settings.yml
@@ -765,5 +765,6 @@ doi_resolvers :
oadoi.org : 'https://oadoi.org/'
doi.org : 'https://doi.org/'
doai.io : 'http://doai.io/'
+ sci-hub.tw : 'http://sci-hub.tw/'
default_doi_resolver : 'oadoi.org'