From 7791b56419a1b44dc0adb77f828b0c7b5afdc736 Mon Sep 17 00:00:00 2001 From: xnand-dot-xyz <224628274+xnand-dot-xyz@users.noreply.github.com> Date: Fri, 12 Sep 2025 15:35:40 +0000 Subject: [PATCH] check if workaroundTokens is None before splitting --- twitfix.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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))