diff options
Diffstat (limited to 'pyAggr3g470r.py')
-rw-r--r-- | pyAggr3g470r.py | 5 |
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 {} |