From f799d2485b8d90854aeb22f1a575ae21d699510f Mon Sep 17 00:00:00 2001 From: pluja Date: Wed, 9 Sep 2020 11:26:56 +0200 Subject: [PATCH] Add suport for removed Tweets (#42) --- app/routes.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/routes.py b/app/routes.py index 68abe60..949278c 100644 --- a/app/routes.py +++ b/app/routes.py @@ -669,7 +669,10 @@ def getFeed(urls): if quote.find('a', attrs={'class':'still-image'}): newPost.replyAttachedImg = NITTERINSTANCE+quote.find('a', attrs={'class':'still-image'})['href'][1:] - newPost.replyingUser=quote.find('a', attrs={'class':'username'}).text + if quote.find('div', attrs={'class':'unavailable-quote'}): + newPost.replyingUser="Unavailable" + else: + newPost.replyingUser=quote.find('a', attrs={'class':'username'}).text post.find('div', attrs={'class':'quote'}).decompose() if post.find('div', attrs={'class':'attachments'}):