Updated tweet history endpoint & temporarily using guest token

This commit is contained in:
Dylan
2025-05-24 00:38:17 +01:00
parent 7e8f7b87c9
commit fc17870b06
2 changed files with 14 additions and 5 deletions

View File

@@ -230,6 +230,14 @@ def getApiResponse(tweet,include_txt=False,include_rtf=False):
if 'in_reply_to_status_id_str' in tweetL and tweetL['in_reply_to_status_id_str'] != None:
replyingToID = tweetL['in_reply_to_status_id_str']
if 'screen_name' not in userL and 'core' in tweet["core"]["user_results"]["result"]:
userL['screen_name'] = tweet["core"]["user_results"]["result"]["core"]["screen_name"]
if 'name' not in userL:
userL['name'] = tweet["core"]["user_results"]["result"]["core"]["name"]
if 'profile_image_url_https' not in userL and 'avatar' in tweet["core"]["user_results"]["result"]:
userL['profile_image_url_https'] = tweet["core"]["user_results"]["result"]["avatar"]["image_url"]
apiObject = {
"text": twText,
"likes": tweetL["favorite_count"],