summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Heiser <markus.heiser@darmarit.de>2022-09-25 15:46:29 +0200
committerMarkus Heiser <markus.heiser@darmarit.de>2022-09-25 15:46:29 +0200
commit52023e3d6ec8133d3b745be57df551a5d3b45bdf (patch)
tree6b2c6d95a307fff55276d34f8b2cc755c5b32c2b
parent94c4cc126b16d4cd1653c410df63af4bc0a4e998 (diff)
downloadsearxng-52023e3d6ec8133d3b745be57df551a5d3b45bdf.tar.gz
searxng-52023e3d6ec8133d3b745be57df551a5d3b45bdf.zip
[fix] doc of the paper.html template (isbn, issn)
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
-rw-r--r--docs/dev/engine_overview.rst4
-rw-r--r--searx/engines/core.py5
2 files changed, 5 insertions, 4 deletions
diff --git a/docs/dev/engine_overview.rst b/docs/dev/engine_overview.rst
index efe9d7bf3..ae04d527c 100644
--- a/docs/dev/engine_overview.rst
+++ b/docs/dev/engine_overview.rst
@@ -386,11 +386,11 @@ the parameter ``template`` must be set to the desired type.
- DOI number (like ``10.1038/d41586-018-07848-2``)
* - issn
- - :py:class:`str`
+ - :py:class:`List <list>`\ [\ :py:class:`str`\ ]
- ISSN number like ``1476-4687``
* - isbn
- - :py:class:`str`
+ - :py:class:`List <list>`\ [\ :py:class:`str`\ ]
- ISBN number like ``9780201896831``
* - pdf_url
diff --git a/searx/engines/core.py b/searx/engines/core.py
index 2a71a216c..2fa66e226 100644
--- a/searx/engines/core.py
+++ b/searx/engines/core.py
@@ -77,6 +77,7 @@ def response(resp):
if url is None:
continue
+ publishedDate = None
time = source['publishedDate'] or source['depositedDate']
if time:
publishedDate = datetime.fromtimestamp(time / 1000)
@@ -106,8 +107,8 @@ def response(resp):
# 'pages' : '',
# 'number': '',
'doi': source['doi'],
- 'issn': source['issn'],
- 'isbn': source.get('isbn'), # exists in the rawRecordXml
+ 'issn': [x for x in [source.get('issn')] if x],
+ 'isbn': [x for x in [source.get('isbn')] if x], # exists in the rawRecordXml
'pdf_url': source.get('repositoryDocument', {}).get('pdfOrigin'),
}
)