Temporary switch to syndication
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -290,14 +290,14 @@ def getUserData(twitter_url,includeFeed=False):
|
||||
workaroundTokens = config['config']['workaroundTokens'].split(",")
|
||||
else:
|
||||
workaroundTokens = None
|
||||
rawUserData = twExtract.extractUser(twitter_url,workaroundTokens=workaroundTokens))
|
||||
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))
|
||||
|
||||
Reference in New Issue
Block a user