vladkens / twscrape

2024! X / Twitter API scrapper with authorization support. Allows you to scrape search results, User's profiles (followers/following), Tweets (favoriters/retweeters) and more.
https://pypi.org/project/twscrape/
MIT License
1.12k stars 133 forks source link

IDs in Retrieve the Tweet Details #116

Closed linxux closed 7 months ago

linxux commented 9 months ago

According to the Twitter IDs,

Each object within Twitter - a Tweet, Direct Message, User, List, and so on - has a unique ID.

Twitter IDs are unique 64-bit unsigned integers that are generated by Snowflake.

The IDs in response from api.tweet_details should be represented as strings by default or with a conrecponse field suffix with _str,

{
  ...
  "conversationId":1751817528785936384,
+ "conversationId_str":"1751817528785936414",
  "inReplyToTweetId":1751817528785936384,
+ "inReplyToTweetId_str":"1751817528785936414",
  "inReplyToUser":{
    ...
    "id":1486473049146904576,
+   "id_str":"1486473049146904576"
  },
  "mentionedUsers":[
    {
...
      "id":1486473049146904576,
+     "id_str":"1486473049146904576"
    }
  ],
...
}
vladkens commented 7 months ago

@linxux should be fixed in v0.11.

Thank you!