aboutsummaryrefslogtreecommitdiff
path: root/pyAggr3g470r.py
diff options
context:
space:
mode:
authorcedricbonhomme <devnull@localhost>2010-01-31 12:45:38 +0100
committercedricbonhomme <devnull@localhost>2010-01-31 12:45:38 +0100
commit7eaee7d8c2f06a8ed15c326e31f9724ee75e8040 (patch)
treea7388e4d773984a8989b7fc87e3e2ed1e30275b0 /pyAggr3g470r.py
parentAll date are parsed into the standard Python datetime format. (diff)
downloadnewspipe-7eaee7d8c2f06a8ed15c326e31f9724ee75e8040.tar.gz
newspipe-7eaee7d8c2f06a8ed15c326e31f9724ee75e8040.tar.bz2
newspipe-7eaee7d8c2f06a8ed15c326e31f9724ee75e8040.zip
Sort articles by date for each feeds.
Diffstat (limited to 'pyAggr3g470r.py')
-rw-r--r--pyAggr3g470r.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/pyAggr3g470r.py b/pyAggr3g470r.py
index bc6f6340..34f6e226 100644
--- a/pyAggr3g470r.py
+++ b/pyAggr3g470r.py
@@ -81,10 +81,15 @@ class Root:
dic = {}
for article in list_of_articles:
if article[2] not in dic:
+
dic[article[2]] = [(article[0], article[1], article[3], article[4])]
else:
dic[article[2]].append((article[0], article[1], article[3], article[4]))
+ # sort articles by date for each feeds
+ for feeds in dic.keys():
+ dic[article[2]].sort(lambda x,y: cmp(y[0], x[0]))
+
return dic
return {}
bgstack15