Questions tagged [tweepy]

An easy-to-use Python library for accessing the Twitter API. It can be used with Python (2.6, 2.7, and 3.x).

0
votes
1answer
15 views

Analyze Twitter friends without exceeding rate limit

How can I analyze a list of followers (or following), and count the number users with a following/follwer ratio of < .2 without it taking forever with the API limits? This is the code I'm using to ...
0
votes
0answers
17 views

How to filter multiple operators?

How do I filter multiple operators in the standard search API using Tweepy? I'd like to filter out retweets, tweets with links and tweets with media (i.e. images). I've tried query = query + "-...
-3
votes
0answers
31 views

how can i get following list of a user by tweepy and twitter api

i want to get a twitter user following list (them screen name) by twitter API but tweepy have no any models for it have you any suggestion code for it? for followers tweepy have a api also for ...
-1
votes
1answer
12 views

Twitter API - Tweepy Library - send_direct_message

I am new to Tweepy (v3.7.0) and I am trying to send a direct message to some of my followers. However, the send_direct_message(user_id/screen_name,text) function does not seem to work. I found a few ...
-1
votes
0answers
11 views

Python Tweepy API Functions - Follow function

I am new to using Tweepy and I am trying to test a small piece of code to automatically follow back all those who follow me on Twitter. The code works fine but it takes a lot of time (approximately 15 ...
0
votes
0answers
20 views

how to fix “ Could not find a version that satisfies the requirement install (from versions: ) No matching distribution found for install ” error

I want to install tweepy module to my python project. I read in documentation to use command "pip install tweepy". But it shows up an error in command prompt. C:\Python36>pip install tweepy ...
0
votes
1answer
17 views

Tweepy not returning full list of users

Hi so I am very new to python and I am trying to write this code to utilize tweepy to pull all the users that have used a particular hashtag. The hashtag is very low volume roughly 30 tweets as of now ...
0
votes
1answer
25 views

How to make this script loop until there are no errors python?

I'm trying to make this script loop until there are no errors but I'm pretty new to python and just keep encountering errors I've tried everything I know but this isnt an easy task for me def ...
0
votes
0answers
19 views

How to fix maximum recursion error on tweepy?

I am trying to output some tweets from my timeline using the home_timeline module but I keep getting a maximum recursion error. This is on Jupyter notebook and I have already pip installed tweepy. ...
1
vote
1answer
34 views

Find emojis in a tweet as whole clusters and not as individual chars

So first question I've ever asked on here, and its about emojis. I'm sorry. I am making a twitter bot in python with the help of Tweepy, and regex ( also tried python-pcre ) that will analyse a tweet ...
0
votes
1answer
21 views

Can the Tweepy cursor search query go through a list of words loaded from a file?

I'm trying to make my bot be able to search for multiple keywords through the search API. So far I have: f = open('swear.txt', 'r') search = f.read().splitlines() f.close() for x in search: #goes ...
0
votes
0answers
15 views

Twitter error response: status code = 400, after executing a query with “near” in a Cursor

I have a Cursor that I pass a query in which I consult a certain hashtag issued in a certain place, but I find an error of type "Twitter error response: status code = 400". I do not understand how to ...
0
votes
0answers
29 views

How to create a twitter bot that replies back as soon as another person tweets?

Yesterday I wrote a twitter bot with Python that takes the most recent tweet from Donald Trump, translates it over in Google Translate 45 times, and tweets back at him the final translation in English....
0
votes
0answers
10 views

Having encoding issues with gathering tweets using tweepy

I'm using Tweepy to gather tweets to form a dataset. When pulling in tweets using the search function, it gathers tweets perfectly fine, although does contain characters such as '\n' which is fine and ...
0
votes
2answers
33 views

Extract Country of fetched Tweets

I fetched Tweets and save it into csv by using tweepy. I want to extract country. I used tweet.author.location for extracting location. It gave me location like(city,state,country etc). I want to ...
-1
votes
0answers
17 views

Not able to get all the tweets for a hashtag

I have written code using tweepy to get all the tweets for a particular hastag using tweepy cursor but when I am verifying from the tweeter website manually, I am not able to see some tweets in ...
0
votes
1answer
10 views

Trouble parsing for specific things like created_at, favorite_count, etc using tweepy

I'm currently using Twitter API to search for tweets using tweepy, and I'm trying to parse for specific parts of a tweet like created_at, favorites, retweets, user id, id, and text of the tweet, but ...
0
votes
0answers
24 views

Why am I failing to send requests to Tweepy (Twitter's API) failing all of a sudden?

I have a script that writes content to my Twitter accounts using Twitter's API, Tweepy. All of a sudden, the script has come into trouble sending requests to Tweepy. Nothing in my script has changed ...
0
votes
1answer
25 views

Python Tweepy API Functions

I have been playing around with Tweepy for a couple of days. Wanted to create a simple program to follow my followers: for follower in tweepy.Cursor(api.followers).items(): follower.follow() ...
0
votes
0answers
11 views

get direct messages using tweepy

I am having trouble getting direct messages using python tweepy. I have tried following approaches; since_id = "11223344556677889" directMsgs = extractor.get_direct_message(count="10") print(...
0
votes
0answers
43 views

Tweepy get Tweets related to a specific country

Context I am working on a topic modeling for twitter project. The idea is to retrieve all tweets related to a specific country and analyze them in order to discover what people from a specific ...
0
votes
0answers
11 views

Unable to send tweet reply using api.update_status [Tweepy Twitter App]

I have been abled to successfully create a twitter app using https://www.youtube.com/watch?v=W0wWwglE1Vc But problem is based on given keyword #helloworld ,app Doesn't replies to tweets and no ...
0
votes
0answers
20 views

How can i fetch full text from twitter? i want to use the tweet_mode and full_text.. how can i and where to use?

import tweepy import pandas as pd import matplotlib.pyplot as plt pd.set_option('display.unicode.east_asian_width', True) consumerKey = 'somekey' consumerSecret = '...
0
votes
0answers
27 views

Questions about fetching tweet information based on tweetID

I am currently doing a project about finding traffic-related information from real-time tweets. The datasets are provided here: Tweets with traffic-related labels. However, the original dataset only ...
0
votes
0answers
25 views

Delete duplicate tweets and send new tweet

I am trying to send tweets to my twitter account via Python. And I noticed I have an error when I tried to send duplicate tweets. I now want to: if I were to send a duplicate tweet, I would like it to ...
0
votes
0answers
28 views

Getting weird characters in tweet text when using tweepy [duplicate]

I am using the tweepy API to get some twitter tweets, and a lot of the text I extract has weird characters in it after I save it to a CSV file. tweets = api.user_timeline(screen_name=outlet, count=...
1
vote
2answers
39 views

How can I get a large list of followers from a Twitter user and then follow them?

How can I get a list of followers from a Twitter account with a lot of followers? My code is meant to get followers from a user and then follow them but max I can get and follow is 200 with my code ...
0
votes
0answers
10 views

How to get extended Text of Tweets using tweepy in python

I am using Tweepy to extract the tweets from the twitter but I am only getting the half text, how can I extract full text from the twitter source ? I have tried status.full_text, but it gives the ...
3
votes
1answer
72 views

Why do all my decoded Strings have '?' at the end? Java String decoding

I am retrieving tweets from Twitter using the Tweepy library (Python) and Kafka. The text is encoded in UTF-8 as this line shows: self.producer.send('my-topic', data.encode('UTF-8')) Where "data" is ...
0
votes
0answers
17 views

How to search by user_id or user_name in tweepy?

Can someone please tell me how I can retrieve tweets by certain user_id or user_name using tweepy? so far I only have this: new_tweets = api.search(q=keyword, count=tweetsPerQry, geocode="23....
0
votes
0answers
28 views

How to fix 'on_exception() missing 1 required positional argument: exception'?

I'm trying to use tweepy to stream tweets from the Streaming API and print the text of each tweet that has been streamed. I get the following error: TypeError: on_exception() missing 1 required ...
0
votes
1answer
30 views

Issue Running Python 3.7 in PyCharm to Execute Twitter Bot (via Tweepy)

I am attempting to run Python 3.7 code within PyCharm to execute a Twitter bot from Tweepy (Twitter's API). -I have a developer account with Twitter, which has been approved. -I have my correct ...
1
vote
1answer
21 views

Is there a time-limit on the tweets per account you can query with the Twitter API?

I am trying te retrieve Tweets from half a year ago using Tweepy and the Twitter API. Accounts with lower tweet frequency are no problem , but more active accounts doe not supply older tweets. The ...
0
votes
0answers
14 views

How to get tweets in which specific handle is tagged?

I am using "TWEEPY" library to get the tweets for some restaurant handles. Able to fetch tweets tweeted by those handles. How can I fetch the tweets tweeted by other user tagging restaurant handles? ...
0
votes
0answers
17 views

Tweepy giving error on trying to retrieve tweets by ID

I have a list of tweet IDs that I want to download using tweepy, I included a sample of them in the list in the code, but I get an error on all of them I replaced the tokens and keys with the actual ...
0
votes
1answer
8 views

Code for Tweepy streamlistener gives error when coordinates or image no included in tweet

I'm trying to push tweets to mysql db from my streamlistener. The code works when I include a tweet location in the tweet but fails when I don't. How do I override this completely so it writes any ...
0
votes
0answers
24 views

Column display problem in Pycharm and extraction of user data from Twitter

I'm new using Python, through guides and tutorials and with the help of a good friend, I'm trying to extract data from Twitter through "tweepy" for a university job, the code used is the following: ...
0
votes
0answers
30 views

How do I get the impressions counter from Twitter using tweepy python-twitter-api?

How to I get the impressions counter from twitter using python-twitter-api? This is my code, so far: #!/usr/bin/python3 ...
-2
votes
1answer
17 views

Get tweets about certain items from a specific user

So I want to get historical tweets of a specific user talking about an item or containing this item I tried this code but it always gives me 0 tweets however I'm sure that the user had tweeted about ...
0
votes
0answers
21 views

I am having issue connecting the twitter streamer to the matplotlib live graph

I would like my output from my StdOutListener to be plotted live. The problem is, that the twitter stream itself is a loop that can not be terminated multiple times in a row to update the graph, so I ...
0
votes
0answers
12 views

Problem with Tweepy cursor inside two loops, trying to increment a value in the cursor

I'm trying to run a loop outside of Tweepy regular cursor´s loop. In detail: I get a certaing number of tweets from an user, and them I want to jump to another user and do the same thing again and ...
-2
votes
1answer
32 views

syntax error near to a random word on sqlite3?

I'm currently on a python program where I'm having fun retrieving tweets related to a topic I'm giving away, and then storing them in a sqlite database. The insertion goes very well except that from ...
0
votes
0answers
16 views

Tweepy.StreamListener() giving strange output

I'm trying to run a tweepy Stream and I'm getting this strange output---'401', over and over again--regardless of the str's I'm tracking, and even with different StreamListener classes/overrides of ...
0
votes
1answer
92 views

How to get individual items from tweepy stream

I can't seem to get individual items i.e. getting just the text or just the user. I've tried to use it as a dictionary or list but nothing seems to work. I don't, however, know how trustworthy my ...
0
votes
1answer
17 views

Getting error while access twitter API using Tweepy

I am using Python 3 to access twitter APi for some tweet analysis. However, i am not able to get any data through API call. I already did tried upgrading requests and pyopensssl. But still issue ...
1
vote
1answer
37 views

Python: Exception not getting caught in Tweepy for WantReadError

I'm using Tweepy to capture the Twitter streaming API. As with this question, I will occasionally get a series of errors when there's a problem with the connection, beginning with Exception in thread ...
0
votes
1answer
31 views

how can i encode/decode finnish characters?

I explain my problem as best I can, but here it is: My program translates all the tweets to me and then integrates them into the JSON but as soon as it comes across a Finnish character the program ...
0
votes
0answers
14 views

How to collect Tweets replies by only using search keyword?

I collect Tweets replies by only using a search keyword(s). I'm using simple cursor with a keyword query parameter like below: for tweet in tweepy.Cursor(api.search,q="Ballon OR Balon",tweet_mode='...
1
vote
0answers
11 views

Twitter API Stream

I'm using twitter API streaming with tweepy to track tweets containing a list of terms. One of the terms I want to track is "BE", which is an acronym of a Portuguese party. The problem is that the ...
0
votes
0answers
7 views

My Python code using Tweepy works one day and stops another

I've written a Python code for taking some interesting matters on some blog's Twitter profile and take the content of the link. import tweepy import scrap import time import auth.auth as auth import ...