Questions tagged [tweepy]

Tweepy is an easy-to-use Python library for accessing the Twitter API. It can be used with Python (3.7+).

Tweepy is an open source Python library for accessing the Twitter API.

The source code and documentation are available on GitHub. The library also has a community Discord server.

3361 questions
0
votes
0 answers

AWS Lambda OpenAi Twitter Bot Python

def tweet_mood(sign, mood): tweet = f"{sign}: {mood}" if len(tweet) <= 280: response = client.create_tweet(text=tweet) tweet_id = response.data.id else: tweets = [tweet[i:i+277] + "..." for i in range(0,…
0
votes
0 answers

Tweetpy cannot search anything. How to apply for Elevated access?

I use twitter developer free version. I try use tweetpy search data from twitter like this code. from tweepy import OAuthHandler consumer_key = 'xxxxxxx' consumer_secret = 'xxxxxxx' auth = tweepy.OAuthHandler(consumer_key, consumer_secret) client…
user58519
  • 579
  • 1
  • 4
  • 19
0
votes
0 answers

How to get the Tweet JSON

I have a tweet number, how do I get the JSON file from this tweet number? I was using this code below: # Autenticar com a API do Twitter auth = tweepy.OAuthHandler(consumer_key, consumer_secret) auth.set_access_token(access_token,…
FabioMathu
  • 13
  • 1
0
votes
0 answers

Tweepy 401 error with both search_all_tweets and search_recent_tweets

I'm trying to retrieve the most recent tweets or all tweets with tweepy. All the keys and tokens from the twitter app are already defined also the permissions needed for the access to the app, but I'm still gettin this Unatorizhed error Traceback…
0
votes
0 answers

Tweepy 403 Forbidden Error Trying to Read Data

I am unable to read data from twitter using tweepy. Hi there, I am trying to read some data from twitter using tweepy. Here is my very basic code: import…
0
votes
1 answer

tweepy.errors.Forbidden: 403 Forbidden with no explantion

I've been trying all day fixing this issue with my code, for some reason I get File "C:\Users\Watch\Desktop\Line Web App\main.py", line 104, in index twitter_client.create_tweet(text=message,user_auth=False) File…
maloni
  • 31
  • 3
0
votes
0 answers

tweepy.Client is not working, after last tweeter update

Twitter send a massage that I need to subscribe to reactivate my account. I subscribed for the free plane and, NONE of my code is working anymore. I am using tweepy.Clint client = tweepy.Client(bearer_token=BEARER_TOKEN) showing this error for any…
A7med
  • 3
  • 2
0
votes
0 answers

twitter scrape tool not working with tweepy v4.0.0.0^

This is the code I have written out to scrape twitter for specific keywords in tweets, and then send those tweets to a dedicated slack channel: import os import tweepy from slack_sdk import WebClient from slack_sdk.errors import SlackApiError from…
0
votes
0 answers

Consumer key must be string or bytes, not NoneType

I have done everything correctly and putted everything key correctly. So why it is showing the error. `import tweepy import openai # replace the placeholders with your own keys and tokens consumer_key = 'my-key' consumer_secret =…
0
votes
1 answer

Error while redirecting to Twitter authorization URL

I was trying to authorize my app using tweepy. But when redirected to the authorization url, i see a Twitter page like this: "Failed to grant access to the application. Try going back and logging in again." and an error like…
Furkan Suren
  • 41
  • 1
  • 5
0
votes
1 answer

Tweepy get followers list

I need to obtain all the followers of a Twitter account that has aprox 125K follores. So I run this code: import tweepy auth = tweepy.OAuth2AppHandler(api_key, api_secret) api =…
anitasp
  • 577
  • 4
  • 13
  • 35
0
votes
0 answers

Oauth2 - Tweepy - where to pass refresh_token?

Ive been stuck for a while now, would appreciate any help. I understand Oauth2. Im able to: authenticate and also am able to get a refresh_token oauth2_user_handler = tweepy.OAuth2UserHandler( client_id=client_id, …
dumb
  • 1
0
votes
0 answers

Sagemaker Notebook instance very slow with tweepy api

I collect tweets from file has more than 700,000 ids for tweets by using tweepy . Locally I have I7 processor and 16 GB ram and I make for loop on these ides to get the full text , geo , coordinates and place attributes. And by using tqdm library…
0
votes
0 answers

Scraping tweets from a set list of accounts within the past hour - no tweets being detected

I have a set number of accounts that I need to monitor and I am trying to create a script in Python using Tweepy that can scrape all Tweets from these accounts in the past hour and compile them into a list. The code runs without error, but it says…
0
votes
1 answer

How to get all tweets that has an unique keyword and posted from a specific user?

Hi I am trying to get the tweets that has an unique keyword and posted from a specific user with tweepy. I wrote the code below but I can't get all tweets. How can I fix this issue? def get_tweet_keyword_from_user(keyword, user): tweets =…
fy23
  • 1
1 2 3
99
100