diff --git a/app/routes.py b/app/routes.py index a54b9c6..c8075ce 100644 --- a/app/routes.py +++ b/app/routes.py @@ -97,8 +97,8 @@ def twitter(page=0): else: time_diff = 999 - # If cache file is more than 1 minute old - if page == 0 and time_diff > 60: + # If cache file is older than 30 minute old + if page == 0 and time_diff > 30: if cache_file: for f in cache_file: os.remove(f) diff --git a/nitter/feed.py b/nitter/feed.py index 05f820b..6ff5fd3 100644 --- a/nitter/feed.py +++ b/nitter/feed.py @@ -39,11 +39,10 @@ def get_feed(usernames, daysMaxOld=10, includeRT=True): userFeed.append(tweet) else: userFeed+=feed - try: - for uf in userFeed: - if uf == 'emptyFeed': - userFeed.remove(uf) - userFeed.sort(key=lambda item:item['timeStamp'], reverse=True) - except: - return userFeed + + for uf in userFeed: + if uf == 'emptyFeed': + userFeed.remove(uf) + userFeed.sort(key=lambda item:item['timeStamp'], reverse=True) + return userFeed \ No newline at end of file