Category : twitter

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) ..

Read more

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 ..

Read more

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 ..

Read more

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: ..

Read more