plutopluto

git clone https://git.ce9e.org/plutopluto.git

commit
d8a75faeab403a748f4ec508ab4a99d04d1ba08a
parent
7fc0a87eb2d0b0b3a44721bc4a5e474a1ecaab40
Author
Tobias Bengfort <tobias.bengfort@posteo.de>
Date
2017-03-09 13:17
consider "updated" date if "published" is not available

Diffstat

M plutopluto/__init__.py 2 ++

1 files changed, 2 insertions, 0 deletions


diff --git a/plutopluto/__init__.py b/plutopluto/__init__.py

@@ -43,6 +43,8 @@ def parse(url):
   43    43 		d = dict()
   44    44 		if 'published_parsed' in item:
   45    45 			d['dt'] = mktime(item['published_parsed'])
   -1    46 		elif 'updated_parsed' in item:
   -1    47 			d['dt'] = mktime(item['updated_parsed'])
   46    48 		else:
   47    49 			d['dt'] = int(time()) - i  # - i to preserve sort order
   48    50 		d['id'] = item.get('id')