Commit 187f3efa authored by PkSM3's avatar PkSM3

[BUGFIX] europress parser (recognize all dates)

parent b8e3f83b
......@@ -101,7 +101,9 @@ class EuropressFileParser(FileParser):
metadata['publication_date'] = datetime.strptime(text, '%B %Y')
except :
try:
metadata['publication_date'] = dateutil.parser.parse(text)
locale.setlocale(locale.LC_ALL, "fr_FR")
metadata['publication_date'] = datetime.strptime(text, '%d %B %Y')
# metadata['publication_date'] = dateutil.parser.parse(text)
except Exception as error:
print(error)
print(text)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment