Temporary switch to syndication

This commit is contained in:
Dylan
2025-09-24 20:59:19 +01:00
parent acc81df27b
commit 433f015c07
2 changed files with 6 additions and 6 deletions

View File

@@ -495,7 +495,7 @@ def fixTweetData(tweet):
def extractStatus(url,workaroundTokens=None):
# TODO: commented out methods are too slow/unreliable at the moment
methods=[extractStatusV2Anon,extractStatusV2]#,extractStatusV2Android,extractStatusV2TweetDetail] #
methods=[extractStatus_syndication,extractStatusV2]#,extractStatusV2Android,extractStatusV2TweetDetail] #
for method in methods:
try:
result = method(url,workaroundTokens)

View File

@@ -287,17 +287,17 @@ def getTweetData(twitter_url,include_txt="false",include_rtf="false"):
def getUserData(twitter_url,includeFeed=False):
if config['config']['workaroundTokens'] is not None:
workaroundTokens = config['config']['workaroundTokens'].split(",")
else:
workaroundTokens = None
rawUserData = twExtract.extractUser(twitter_url,workaroundTokens=workaroundTokens))
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=workaroundTokens))
feed = twExtract.extractUserFeedFromId(userData['id'],workaroundTokens=workaroundTokens)
apiFeed = []
for tweet in feed:
apiFeed.append(getApiResponse(tweet))