check if workaroundTokens are None before trying to split them

* the default config has them set to null, so we should check first
This commit is contained in:
zImPatrick 2025-03-07 21:07:47 +01:00
parent 0b43a3e05a
commit 0e6748d86a
No known key found for this signature in database
GPG Key ID: 0B6AA9A0E50A60E6

View File

@ -177,7 +177,12 @@ def getTweetData(twitter_url,include_txt="false",include_rtf="false"):
rawTweetData = None
if rawTweetData is None:
try:
rawTweetData = twExtract.extractStatus(twitter_url,workaroundTokens=config['config']['workaroundTokens'].split(','))
if config['config']['workaroundTokens'] is not None:
workaroundTokens = config['config']['workaroundTokens'].split(",")
else:
workaroundTokens = None
rawTweetData = twExtract.extractStatus(twitter_url,workaroundTokens=workaroundTokens)
except:
rawTweetData = None
if rawTweetData == None or 'error' in rawTweetData: