API fix for TweetWithVisibilityResults
This commit is contained in:
parent
645e7cc329
commit
09ed116ca5
@ -104,10 +104,12 @@ def twitfix(sub_path):
|
|||||||
|
|
||||||
image = ( int(request.url[-1]) - 1 )
|
image = ( int(request.url[-1]) - 1 )
|
||||||
return embed_video(clean, image)
|
return embed_video(clean, image)
|
||||||
elif request.url.startswith("https://api.vx"):
|
elif True:
|
||||||
twitter_url = "https://twitter.com/" + sub_path
|
twitter_url = "https://twitter.com/" + sub_path
|
||||||
try:
|
try:
|
||||||
tweet = twExtract.extractStatusV2(twitter_url)
|
tweet = twExtract.extractStatusV2(twitter_url)
|
||||||
|
if '__typename' in tweet and tweet['__typename'] == 'TweetWithVisibilityResults':
|
||||||
|
tweet=tweet['tweet']
|
||||||
tweetL = tweet["legacy"]
|
tweetL = tweet["legacy"]
|
||||||
userL = tweet["core"]["user_results"]["result"]["legacy"]
|
userL = tweet["core"]["user_results"]["result"]["legacy"]
|
||||||
media=[]
|
media=[]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user