Add support for ?withFeed in API user requests

This commit is contained in:
Dylan
2025-04-27 17:30:07 +01:00
parent 84b620894f
commit 441b620b87
7 changed files with 73 additions and 22 deletions

View File

@@ -98,7 +98,7 @@ def getApiResponse(tweet,include_txt=False,include_rtf=False):
if "hashtags" in tweetL["entities"]:
for i in tweetL["entities"]["hashtags"]:
hashtags.append(i["text"])
elif "card" in tweet and tweet['card']['name'] == "player":
elif "card" in tweet and 'name' in tweet['card'] and tweet['card']['name'] == "player":
width = None
height = None
vidUrl = None