summaryrefslogtreecommitdiff
path: root/searx
diff options
context:
space:
mode:
authorAlexandre Flament <alex@al-f.net>2022-09-28 09:19:20 +0200
committerGitHub <noreply@github.com>2022-09-28 09:19:20 +0200
commit7097508a67eb32cb7e39f51ec1e1c794f571f568 (patch)
tree6b2c6d95a307fff55276d34f8b2cc755c5b32c2b /searx
parent94c4cc126b16d4cd1653c410df63af4bc0a4e998 (diff)
parent52023e3d6ec8133d3b745be57df551a5d3b45bdf (diff)
Merge pull request #1811 from return42/fix-paper.html
[fix] doc of the paper.html template (isbn, issn)
Diffstat (limited to 'searx')
-rw-r--r--searx/engines/core.py5
1 files changed, 3 insertions, 2 deletions
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'),
}
)