Avoid calling extractStatusV2Anon twice
This commit is contained in:
@@ -265,17 +265,11 @@ def getTweetData(twitter_url,include_txt="false",include_rtf="false"):
|
|||||||
if cachedVNF is not None and include_txt == "false" and include_rtf == "false":
|
if cachedVNF is not None and include_txt == "false" and include_rtf == "false":
|
||||||
return cachedVNF
|
return cachedVNF
|
||||||
|
|
||||||
try:
|
|
||||||
rawTweetData = twExtract.extractStatusV2Anon(twitter_url, None)
|
|
||||||
except:
|
|
||||||
rawTweetData = None
|
|
||||||
if rawTweetData is None:
|
|
||||||
try:
|
try:
|
||||||
if config['config']['workaroundTokens'] is not None:
|
if config['config']['workaroundTokens'] is not None:
|
||||||
workaroundTokens = config['config']['workaroundTokens'].split(",")
|
workaroundTokens = config['config']['workaroundTokens'].split(",")
|
||||||
else:
|
else:
|
||||||
workaroundTokens = None
|
workaroundTokens = None
|
||||||
|
|
||||||
rawTweetData = twExtract.extractStatus(twitter_url,workaroundTokens=workaroundTokens)
|
rawTweetData = twExtract.extractStatus(twitter_url,workaroundTokens=workaroundTokens)
|
||||||
except:
|
except:
|
||||||
rawTweetData = None
|
rawTweetData = None
|
||||||
|
|||||||
Reference in New Issue
Block a user