i’m using tweepy to monitor a user and i’m using the stream element, but i got this error AttributeError: module ‘tweepy.streaming’ has no attribute ‘StreamListener’ this are the import: import tweepy from tweepy import streaming i also tried importing: from tweepy.streaming import Stream this is my code: class MyStreamListener(tweepy.streaming.StreamListener): def on_status(self, status): webhook.send(status.text) # SMS.send(status.text) ..
I’m making a bot that prints the tweets from a specific user using the user_timeline but it gives me this error when i run it. TypeError: user_timeline() takes 1 positional argument but 2 were given This is my full code, obviously i deleted the keys and tokens # import the module import tweepy # assign ..
I want to get all tweets from a specific user containing media. I am currently using this library: https://pypi.org/project/twitter/ from twitter import * def get_posts(user:str): bearer_token = "a_super_secret_string" twitter: Twitter = None twitter = Twitter(auth=OAuth2(bearer_token=bearer_token)) results = self.__twitter.statuses.user_timeline(screen_name=user) for r in results: # For each result if "media" in r["entities"]: # That has some media ..
I have over 1M tweets that I need to screen and I need to check if they have been deleted or not. And I have their URLs, is there a way to use Twitter API to check if the tweets have been deleted or not? also, I have the correspondent list of users, can I ..
The Twitter bot app requires python 3.6.13 to run. While dockerizing it, Dockerfile has alpines’ python versions which is not meeting my apps requirement. How can I install python 3.6.13 in a Dockerfile? For example, in my case, I tried initiating a docker file like this FROM python:3.6-alpine COPY bots/config.py /bots/ COPY bots/stream.py /bots/ COPY ..
This is my first question here, so let me know if you need me to add anything. I have a bot on twitter using tweepy that tweets phrases from a book. When I have a phrase with < 280 characters, I tweet it. If my phrase has > 280 characters, I have a method that ..
I have a code that receives tweets and writes them to csv files. I want to stop this process after a certain amount of time. How can I add a timer to the program. Probably for this you need to use datetime somewhere. Test code, don’t swear too much) from twython import Twython, TwythonError, TwythonStreamer ..
a question to anyone who can help: Just for testing purposes, I’m trying to use Selenium4 and chrome Webdriver with Python to log in to my own Twitter. It seems Twitter has changed its interface: as soon as it detects a chrome being opened by selenium; instead of the usual login page ("https://twitter.com/login"), it opens: ..
I´m trying to remove rows containing blank texts or in tweet texts column. But I have tried in different ways counting the rows that only contain whitespace or counting the leading spaces and trailing spaces but to get a criterion to eliminate it. ID tweet WhiteSpaceCount HaveWhiteSpace 0 this is a text 0 False 1 ..
I have Twitter data where the time variable is ‘created_at’. What I want is to create a 30 minutes interval time to see the spike of Twitter discussion. And base on the interval want to create a histogram type plot where the x-axis will be time/time-interval and y-axis will be the number of tweets in ..