Loading docs/dev/engine_overview.rst +3 −7 Original line number Diff line number Diff line Loading @@ -369,13 +369,9 @@ the parameter ``template`` must be set to the desired type. - :py:class:`str` - volume number * - start_page - :py:class:`int` - page number where the article starts * - end_page - :py:class:`int` - page number where the article ends * - pages - :py:class:`str` - page range where the article is * - number - :py:class:`str` Loading searx/engines/crossref.py +2 −2 Original line number Diff line number Diff line Loading @@ -33,10 +33,10 @@ def response(resp): if record_type == 'book-chapter': title = record['container-title'][0] if record['title'][0].lower().strip() != title.lower().strip(): title = title + ' (' + record['title'][0] + ')' title = html_to_text(title) + ' (' + html_to_text(record['title'][0]) + ')' journal = None else: title = record['title'][0] title = html_to_text(record['title'][0]) journal = record.get('container-title', [None])[0] url = record.get('resource', {}).get('primary', {}).get('URL') or record['URL'] authors = [author.get('given', '') + ' ' + author.get('family', '') for author in record.get('author', [])] Loading searx/engines/semantic_scholar.py +1 −2 Original line number Diff line number Diff line Loading @@ -48,7 +48,6 @@ def request(query, params): def response(resp): res = loads(resp.text) results = [] for result in res['results']: url = result.get('primaryPaperLink', {}).get('url') if not url and result.get('links'): Loading @@ -72,7 +71,7 @@ def response(resp): # pick for the first alternate link, but not from the crawler pdf_url = None for doc in result.get('alternatePaperLinks', []): if doc['linkType'] != 'crawler': if doc['linkType'] not in ('crawler', 'doi'): pdf_url = doc['url'] break Loading searx/engines/springer.py +1 −2 Original line number Diff line number Diff line Loading @@ -58,8 +58,7 @@ def response(resp): 'authors': authors, 'doi': record.get('doi'), 'journal': record.get('publicationName'), 'start_page': record.get('start_page'), 'end_page': record.get('end_page'), 'pages': record.get('start_page') + '-' + record.get('end_page'), 'tags': tags, 'issn': [record.get('issn')], 'isbn': [record.get('isbn')], Loading searx/settings.yml +2 −1 Original line number Diff line number Diff line Loading @@ -412,7 +412,8 @@ engines: - name: crossref engine: crossref shortcut: cr timeout: 10 timeout: 30 disable: true - name: yep engine: json_engine Loading Loading
docs/dev/engine_overview.rst +3 −7 Original line number Diff line number Diff line Loading @@ -369,13 +369,9 @@ the parameter ``template`` must be set to the desired type. - :py:class:`str` - volume number * - start_page - :py:class:`int` - page number where the article starts * - end_page - :py:class:`int` - page number where the article ends * - pages - :py:class:`str` - page range where the article is * - number - :py:class:`str` Loading
searx/engines/crossref.py +2 −2 Original line number Diff line number Diff line Loading @@ -33,10 +33,10 @@ def response(resp): if record_type == 'book-chapter': title = record['container-title'][0] if record['title'][0].lower().strip() != title.lower().strip(): title = title + ' (' + record['title'][0] + ')' title = html_to_text(title) + ' (' + html_to_text(record['title'][0]) + ')' journal = None else: title = record['title'][0] title = html_to_text(record['title'][0]) journal = record.get('container-title', [None])[0] url = record.get('resource', {}).get('primary', {}).get('URL') or record['URL'] authors = [author.get('given', '') + ' ' + author.get('family', '') for author in record.get('author', [])] Loading
searx/engines/semantic_scholar.py +1 −2 Original line number Diff line number Diff line Loading @@ -48,7 +48,6 @@ def request(query, params): def response(resp): res = loads(resp.text) results = [] for result in res['results']: url = result.get('primaryPaperLink', {}).get('url') if not url and result.get('links'): Loading @@ -72,7 +71,7 @@ def response(resp): # pick for the first alternate link, but not from the crawler pdf_url = None for doc in result.get('alternatePaperLinks', []): if doc['linkType'] != 'crawler': if doc['linkType'] not in ('crawler', 'doi'): pdf_url = doc['url'] break Loading
searx/engines/springer.py +1 −2 Original line number Diff line number Diff line Loading @@ -58,8 +58,7 @@ def response(resp): 'authors': authors, 'doi': record.get('doi'), 'journal': record.get('publicationName'), 'start_page': record.get('start_page'), 'end_page': record.get('end_page'), 'pages': record.get('start_page') + '-' + record.get('end_page'), 'tags': tags, 'issn': [record.get('issn')], 'isbn': [record.get('isbn')], Loading
searx/settings.yml +2 −1 Original line number Diff line number Diff line Loading @@ -412,7 +412,8 @@ engines: - name: crossref engine: crossref shortcut: cr timeout: 10 timeout: 30 disable: true - name: yep engine: json_engine Loading