Use new anonymous API endpoint
This commit is contained in:
parent
a099046784
commit
081dfa7680
@ -52,6 +52,10 @@ def test_syndicationAPI():
|
||||
tweet = twExtract.extractStatus_syndication(testMediaTweet,workaroundTokens=tokens)
|
||||
assert tweet["full_text"]==testMediaTweet_compare['description']
|
||||
|
||||
def test_extractStatusV2Anon():
|
||||
tweet = twExtract.extractStatusV2AnonLegacy(testMediaTweet,None)
|
||||
assert tweet["full_text"]==testMediaTweet_compare['description']
|
||||
|
||||
def test_v2API():
|
||||
tweet = twExtract.extractStatusV2Legacy(testMediaTweet,workaroundTokens=tokens)
|
||||
assert tweet["full_text"]==testMediaTweet_compare['description']
|
||||
|
@ -276,7 +276,7 @@ def extractStatusV2AnonLegacy(url,workaroundTokens):
|
||||
return tweet['legacy']
|
||||
|
||||
def extractStatus(url,workaroundTokens=None):
|
||||
methods=[extractStatus_syndication,extractStatusV2Legacy,extractStatus_twExtractProxy]
|
||||
methods=[extractStatusV2AnonLegacy,extractStatus_syndication,extractStatusV2Legacy,extractStatus_twExtractProxy]
|
||||
for method in methods:
|
||||
try:
|
||||
return method(url,workaroundTokens)
|
||||
|
Loading…
x
Reference in New Issue
Block a user