From 005547cb822a0142ed7b95927c39eaf6038961d1 Mon Sep 17 00:00:00 2001 From: pluja Date: Mon, 1 Feb 2021 10:32:11 +0100 Subject: [PATCH] Fix #187 --- nitter/feed.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/nitter/feed.py b/nitter/feed.py index eabf283..10a941b 100644 --- a/nitter/feed.py +++ b/nitter/feed.py @@ -39,10 +39,12 @@ def get_feed(usernames, daysMaxOld=10, includeRT=True): userFeed.append(tweet) else: userFeed+=feed - - for uf in userFeed: - if uf == 'emptyFeed': - userFeed.remove(uf) - userFeed.sort(key=lambda item:item['timeStamp'], reverse=True) - + try: + for uf in userFeed: + if uf == 'emptyFeed': + userFeed.remove(uf) + userFeed.sort(key=lambda item:item['timeStamp'], reverse=True) + except: + print("Error sorting feed - nitter/feed.py") + return userFeed return userFeed