diff --git a/requirements.txt b/requirements.txt index f365729..ef9f74d 100644 --- a/requirements.txt +++ b/requirements.txt @@ -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 diff --git a/twitfix.py b/twitfix.py index 5fb764c..be90aad 100644 --- a/twitfix.py +++ b/twitfix.py @@ -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))