Merge branch 'main' of github.com:dylanpdx/BetterTwitFix

This commit is contained in:
Dylan
2025-09-24 18:35:12 +01:00
2 changed files with 7 additions and 3 deletions

View File

@@ -1,5 +1,5 @@
pymongo==4.8.0
boto3==1.35.18
boto3==1.36.6
requests==2.32.3
Pillow==10.4.0
Flask==2.2.3

View File

@@ -286,14 +286,18 @@ def getTweetData(twitter_url,include_txt="false",include_rtf="false"):
return tweetData
def getUserData(twitter_url,includeFeed=False):
rawUserData = twExtract.extractUser(twitter_url,workaroundTokens=config['config']['workaroundTokens'].split(','))
if config['config']['workaroundTokens'] is not None:
workaroundTokens = config['config']['workaroundTokens'].split(",")
else:
workaroundTokens = None
rawUserData = twExtract.extractUser(twitter_url,workaroundTokens=workaroundTokens))
userData = getApiUserResponse(rawUserData)
if includeFeed:
if userData['protected']:
userData['latest_tweets']=[]
else:
feed = twExtract.extractUserFeedFromId(userData['id'],workaroundTokens=config['config']['workaroundTokens'].split(','))
feed = twExtract.extractUserFeedFromId(userData['id'],workaroundTokens=workaroundTokens))
apiFeed = []
for tweet in feed:
apiFeed.append(getApiResponse(tweet))