forked from Ponysearch/Ponysearch
[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 <markus.heiser@darmarit.de>
This commit is contained in:
parent
219af243a2
commit
173b744ef0
1 changed files with 2 additions and 1 deletions
|
@ -54,7 +54,8 @@ def response(resp):
|
||||||
# parse results
|
# parse results
|
||||||
for result in search_result['mapped']:
|
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
|
# append result
|
||||||
results.append({'url': result['url'],
|
results.append({'url': result['url'],
|
||||||
'title': result['title'],
|
'title': result['title'],
|
||||||
|
|
Loading…
Reference in a new issue