From 173b744ef0fa69c217381bfc000709ba7b336824 Mon Sep 17 00:00:00 2001 From: Markus Heiser Date: Fri, 30 Oct 2020 09:36:11 +0100 Subject: [PATCH] [fix] digg - the ISO time stamp of published date has been changed Error pattern:: Engines cannot retrieve results: digg (unexpected crash time data '2020-10-16T14:09:55Z' does not match format '%Y-%m-%d %H:%M:%S') Signed-off-by: Markus Heiser --- searx/engines/digg.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/searx/engines/digg.py b/searx/engines/digg.py index 831d698bc..cb007d40d 100644 --- a/searx/engines/digg.py +++ b/searx/engines/digg.py @@ -54,7 +54,8 @@ def response(resp): # parse results for result in search_result['mapped']: - published = datetime.strptime(result['created']['ISO'], "%Y-%m-%d %H:%M:%S") + # 'created': {'ISO': '2020-10-16T14:09:55Z', ...} + published = datetime.strptime(result['created']['ISO'], "%Y-%m-%dT%H:%M:%SZ") # append result results.append({'url': result['url'], 'title': result['title'],