mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2025-06-04 16:53:53 -04:00
use dateparser for parsing, let it handle error
This commit is contained in:
parent
58ac44c867
commit
b7785c4138
3 changed files with 7 additions and 6 deletions
|
@ -190,10 +190,10 @@ class Link:
|
|||
for key, val in json_info.items()
|
||||
if key in cls.field_names()
|
||||
}
|
||||
try:
|
||||
info['updated'] = int(parse_date(info.get('updated'))) # Cast to int which comes with rounding down
|
||||
except (ValueError, TypeError):
|
||||
info['updated'] = None
|
||||
# try:
|
||||
info['updated'] = parse_date(info.get('updated')) # Cast to int which comes with rounding down
|
||||
# except (ValueError, TypeError):
|
||||
# info['updated'] = None
|
||||
info['sources'] = info.get('sources') or []
|
||||
|
||||
json_history = info.get('history') or {}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue