VOOZH about

URL: https://www.geeksforgeeks.org/python/python-tweepy-getting-the-id-of-a-status/

⇱ Python Tweepy – Getting the ID of a status - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

Python Tweepy – Getting the ID of a status

Last Updated : 18 Jun, 2020
In this article we will see how we can get the ID of a status. Each status or tweet has a unique ID. The id attribute of the Status object provides us with the ID of the status/tweet. Identifying the ID in the GUI : 👁 Image
In the above mentioned status, the ID can be found in the URL, the ID here is : 1271031982189879297
In order to get the ID of a status, we have to do the following :
  1. Identify the status ID of the status from the GUI.
  2. Get the Status object of the status using the get_status() method with the status ID.
  3. From this object, fetch the id attribute present in it.
Example 1 : Consider the following status : 👁 Image
We will use the status ID to fetch the status. The status ID of the above mentioned status is 1272771459249844224. Output :
The ID of the status is : 1272771459249844224
Example 2 : Consider the following status : 👁 Image
We will use the status ID to fetch the status. The status ID of the above mentioned status is 1272479136133627905.
Output :
The ID of the status is : 1272479136133627905
Comment
Article Tags:
Article Tags: