From ee78a7875a06dc434248c36e2fee297b8dbe53e9 Mon Sep 17 00:00:00 2001 From: pictuga Date: Fri, 10 Apr 2020 16:08:13 +0200 Subject: [PATCH] morss: focus on the most recent feed items --- morss/morss.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/morss/morss.py b/morss/morss.py index 8a3f2f7..50d339b 100644 --- a/morss/morss.py +++ b/morss/morss.py @@ -420,7 +420,8 @@ def FeedGather(rss, url, options): t.daemon = True t.start() - for i, item in enumerate(list(rss.items)): + sorted_items = sorted(rss.items, key=lambda x:x.updated or x.time or 0, reverse=True) + for i, item in enumerate(sorted_items): if threads == 1: worker(*[i, item])