I am making a Twitter bot that transcribes video to text, when people mention the bot on a tweet, I want to get the information of the tweet they mentioned me in, could that be possible with Tweepy?
Sure, you can use Tweepy for tweet statuses.
Here is the link for it:
https://docs.tweepy.org/en/latest/api.html#tweets
Related
I can retweet a tweet by using the tweepy library. But what I want to do is to quote a tweet. I can’t find anything about it.
To post a quote Tweet, you include the link to the original Tweet in the body of the new Tweet you are posting.
Hi I'm new to scraping data from twitter and I've been working on a project to collect tweets and their replies. I scraped the tweets using twitter API , but I couldn't scrape their replies. Any suggestions ?
Scraping is not using API. API is a comfortable method to get data while scraping is doing it manually. If you want to get replies, but the API doesn't provide them, you can use selenium. It is well-known library used for scraping data.
Twitter API does not have an end-point to get replies to a tweet for free users, but there are some ways to achieve what you want, although there may be some limits on how many tweets you can get.
Check-out tweepy library, I think you could use the search method as is explained in this question(How to get the replies for a given tweet with tweepy and python?
). To better understand how to use the tweet object, you should definitely check the docs out.
You can achieve this by:
You want to get replies of #barackobama and Tweet Id is 1234 just example.
Search tweets having #barackobama is tweet text. then make filter on InrplytweetId=1234
by this method you can get replies of this tweet.
I'm trying to create a Twitter bot with Python. So my problem is, is there a function that allows me to get the mentions of a tweet, so I can reply to them?
To write a bot who can reply to tweets mentionning it :
You can use the standard statuses/filter API to watch for tweets mentionning your bot.
For this, the standard search operators says that you just have to write "#yourbot" in the query to get tweets mentionning this user.
Then you can use the POST statuses/update to reply, with the in_reply_to_status_id parameter which is the tweet id to reply to.
I been successfully able to use Twitter REST API to do find tweets and retweet them automatically. Now I want to tweet user a Thank You Message, I am using Python and Tweepy for my BOT. I can do live collection of tweets, using Twitter Streaming API, but I can't understand how to use the API to send a thank you message to those who favorite my tweets. I saw both the documentations but couldn't understand and use much from there. I also tried to search for any example but couldn't find any good one for Streaming API.
Can anyone show me how to use it with tweepy to achieve the same. It would be nice if you can show how to use it when someone retweets my tweet or follows me, I want to send them a thank you tweet automatically.
PS: I understand that Twitter doesn't likes much automation. But its all for learning.
i'm having problem with the twitter api. I used this script Script to delete tweets
To delete the tweets form an account. I see that tweepy method (api,user_timeline) at
for status in tweepy.Cursor(api.user_timeline).items():
try:
will not return those tweets that contain media (accessing twitter from the website they don't show up in the timeline but in another tab called 'photos and videos') so they are not deleted. include_entities is not a parameter for this method.
how can i recover these tweets? I thought i could searching with the username as query, but that doesn't work and could be very inefficient.
is there another method on the twitter API or a parameter that's not included with the documentation?
Thanks for all the help!
I found that this is a problem twitter has when erasing massively tweets. Nothing we can do for now!