Currently I am working on twitter data. I need to fetch twitter data with the tweet id and user id of the tweet. Unfortunately, I am able to fetch the tweet with tweet id only. But along with that I want to get the user id too. I am fetching the tweets by giving the query of the search type. By working with individual tweet id I am able to get the username and from that username I can get the user id. But this manual work for each tweet is too lenghty. Can't there be a way to get directly the user id from the tweet id.
I am using python with tweepy library.
code for search with tweepy.
public_tweets = api.search(q="TheGhantas", lang ="en", count = 200)
public_tweets.id_str is returning me the tweet id and this is helping me to get the tweet username. And from that username, I am getting the user id. Can there be a simple way to get directly the user id from tweet ids if I have a file with tweet ids?