From 3b7ccb0fb5440e4026c5ec246d5232452150eaa9 Mon Sep 17 00:00:00 2001 From: Dylan Date: Sat, 15 Jul 2023 16:05:19 +0100 Subject: [PATCH] API Fixes for the new V2 method --- twitfix.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/twitfix.py b/twitfix.py index e99cc32..dc593ec 100644 --- a/twitfix.py +++ b/twitfix.py @@ -109,7 +109,7 @@ def twitfix(sub_path): try: tweet = twExtract.extractStatusV2(twitter_url) tweetL = tweet["legacy"] - userL = tweet["core"]["user_results"]["result"]["legacy"] + userL = tweet["core"]["user_result"]["result"]["legacy"] media=[] hashtags=[] if "extended_entities" in tweetL: @@ -138,8 +138,8 @@ def twitfix(sub_path): "date": tweetL["created_at"], "user_screen_name": userL["screen_name"], "user_name": userL["name"], - "tweetURL": "https://twitter.com/"+userL["screen_name"]+"/status/"+tweetL["id_str"], - "tweetID": tweetL["id_str"], + "tweetURL": "https://twitter.com/"+userL["screen_name"]+"/status/"+tweetL["conversation_id_str"], + "tweetID": tweetL["conversation_id_str"], "mediaURLs": media, "hashtags": hashtags }