tweepy

Twitter bot using tweepy failed to tweet

Twitter bot using tweepy failed to tweet Question: I do not speak English well. So I am using a translator. Please understand. I’m making a twitter bot that automatically tweets via tweepy. I succeeded in connecting the Twitter app, but it doesn’t tweet. please help me I need your help. This is the code I …

Total answers: 1

Python Twitter bot, Tweepy 4.10.1 gives Traceback error and tweepy.errors.Forbidden 403

Python Twitter bot, Tweepy 4.10.1 gives Traceback error and tweepy.errors.Forbidden 403 Question: I made sure that all the keys and secrets are correct, but I’m just not sure that I’m getting it. (I HAVE ELEVATED ACCESS) I was following this tutorial on YouTube. This is the Python code: import tweepy api_key = "XXXXX" api_secret = …

Total answers: 2

How to extract specific text from JSON response

How to extract specific text from JSON response Question: I am using the Twitter API to source tweets, and am using their provided GitHub example. However, the tweets are given in a JSON format. How can I extract one part (specifically the text and tag) and place it into either a list, dataframe (most ideal …

Total answers: 1

using try-except block to scrape data from twitter api

using try-except block to scrape data from twitter api Question: I’m scraping data from twiter with using their tweet ids but some of the tweets have been deleted so my code throws an error when it gets to those tweets ids how do I use "try-except" to just skip those tweet ids or populate the …

Total answers: 1

get_user() takes 1 positional argument but 2 were given

get_user() takes 1 positional argument but 2 were given Question: I’ve been having issues getting passed this bug, I was wondering If anyone could help. Or could point me in the right direction? I believe the issue may be with API.get_user. But I just cannot find a workaround it. This script is supposed to read …

Total answers: 1

Extract full tweet Tweepy Python

Extract full tweet Tweepy Python Question: I can’t find a way to get the full text of a tweet, I have everything activated, tweet_mode="extended" and I print tweet.full_text, but it keeps getting the trimmed tweet, I’ve looked directly at tweet._json and it’s also trimmed there I don’t understand why import tweepy import configparser from datetime …

Total answers: 1

Handling Connection Error when using Tweepy

Handling Connection Error when using Tweepy Question: Hope you’re all well. I’m trying to extract tweets continuously for a long period of time, using tweepy library. For that I have a python script with an infinite loop running. The only problem is that everytime the connection fails, for any possible reason, my script will crash …

Total answers: 1

Twitter API v2 and Tweepy, how to get tweet author for streamed tweets?

Twitter API v2 and Tweepy, how to get tweet author for streamed tweets? Question: I am trying to filter out tweets that include a specific hashtag, which works great, I can even display the text. But additionally, I want to print the user_screenname or author name. But it seems like my class can only display …

Total answers: 2

Receiving "Stream encountered HTTP error: 403" when using Twitter API. What is causing this error and how can I fix it?

Receiving "Stream encountered HTTP error: 403" when using Twitter API. What is causing this error and how can I fix it? Question: I am very new to using the Twitter API and was testing some Python code (below) from tweepy import OAuthHandler from tweepy import Stream import twitter_credentials class StdOutListener(Stream): def on_data(self, data): print(data) return …

Total answers: 2

understanding tweepy's status object

understanding tweepy's status object Question: I’ve been working with tweepy streaming API and I have noticed one thing. The response of a status object is not pure JSON it has some additional information also. Here’s my question: If I need the text content of a tweet, I have to do status.text which is inside the …

Total answers: 1