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): def extractStatus(url,workaroundTokens=None):
# TODO: commented out methods are too slow/unreliable at the moment # 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: for method in methods:
try: try:
result = method(url,workaroundTokens) result = method(url,workaroundTokens)

View File

@@ -290,14 +290,14 @@ def getUserData(twitter_url,includeFeed=False):
workaroundTokens = config['config']['workaroundTokens'].split(",") workaroundTokens = config['config']['workaroundTokens'].split(",")
else: else:
workaroundTokens = None workaroundTokens = None
rawUserData = twExtract.extractUser(twitter_url,workaroundTokens=workaroundTokens)) rawUserData = twExtract.extractUser(twitter_url,workaroundTokens=workaroundTokens)
userData = getApiUserResponse(rawUserData) userData = getApiUserResponse(rawUserData)
if includeFeed: if includeFeed:
if userData['protected']: if userData['protected']:
userData['latest_tweets']=[] userData['latest_tweets']=[]
else: else:
feed = twExtract.extractUserFeedFromId(userData['id'],workaroundTokens=workaroundTokens)) feed = twExtract.extractUserFeedFromId(userData['id'],workaroundTokens=workaroundTokens)
apiFeed = [] apiFeed = []
for tweet in feed: for tweet in feed:
apiFeed.append(getApiResponse(tweet)) apiFeed.append(getApiResponse(tweet))