logo

searx

My custom branche(s) on searx, a meta-search engine
commit: 19f18a263853136731ef7b6091ae58d4fdb9db19
parent: 74cc2610712ed3cee2c78b6417f73888c5216d1e
Author: Adam Tauber <asciimoo@gmail.com>
Date:   Sun, 19 Aug 2018 13:14:53 +0200

Merge pull request #1360 from Popolon/master

get_doi_resolver return doi resolver url instead of doi resolver name

Diffstat:

Msearx/plugins/oa_doi_rewrite.py3++-
Msearx/settings.yml1+
2 files changed, 3 insertions(+), 1 deletion(-)

diff --git 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 @@ -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'