API Fixes for the new V2 method
This commit is contained in:
parent
08aa7a5315
commit
3b7ccb0fb5
@ -109,7 +109,7 @@ def twitfix(sub_path):
|
|||||||
try:
|
try:
|
||||||
tweet = twExtract.extractStatusV2(twitter_url)
|
tweet = twExtract.extractStatusV2(twitter_url)
|
||||||
tweetL = tweet["legacy"]
|
tweetL = tweet["legacy"]
|
||||||
userL = tweet["core"]["user_results"]["result"]["legacy"]
|
userL = tweet["core"]["user_result"]["result"]["legacy"]
|
||||||
media=[]
|
media=[]
|
||||||
hashtags=[]
|
hashtags=[]
|
||||||
if "extended_entities" in tweetL:
|
if "extended_entities" in tweetL:
|
||||||
@ -138,8 +138,8 @@ def twitfix(sub_path):
|
|||||||
"date": tweetL["created_at"],
|
"date": tweetL["created_at"],
|
||||||
"user_screen_name": userL["screen_name"],
|
"user_screen_name": userL["screen_name"],
|
||||||
"user_name": userL["name"],
|
"user_name": userL["name"],
|
||||||
"tweetURL": "https://twitter.com/"+userL["screen_name"]+"/status/"+tweetL["id_str"],
|
"tweetURL": "https://twitter.com/"+userL["screen_name"]+"/status/"+tweetL["conversation_id_str"],
|
||||||
"tweetID": tweetL["id_str"],
|
"tweetID": tweetL["conversation_id_str"],
|
||||||
"mediaURLs": media,
|
"mediaURLs": media,
|
||||||
"hashtags": hashtags
|
"hashtags": hashtags
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user