mirror of
https://github.com/searxng/searxng.git
synced 2024-11-22 12:10:11 +01:00
[fix] ERROR searx.engines.core.ac.uk: list index out of range
Some result items from core.ac.uk do not have an URL:: Traceback (most recent call last): File "searx/search/processors/online.py", line 154, in search search_results = self._search_basic(query, params) File "searx/search/processors/online.py", line 142, in _search_basic return self.engine.response(response) File "SearXNG/searx/engines/core.py", line 73, in response 'url': source['urls'][0].replace('http://', 'https://', 1), Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
This commit is contained in:
parent
ddd380fc06
commit
3ff2ad939d
@ -53,6 +53,9 @@ def response(resp):
|
||||
for result in json_data['data']:
|
||||
|
||||
source = result['_source']
|
||||
if not source['urls']:
|
||||
continue
|
||||
|
||||
time = source['publishedDate'] or source['depositedDate']
|
||||
if time:
|
||||
date = datetime.fromtimestamp(time / 1000)
|
||||
|
Loading…
Reference in New Issue
Block a user