tweepy

Retrieving specific conversations using Tweepy

Retrieving specific conversations using Tweepy Question: I have been trying to retrieve conversation threads using Tweepy, and although the functionality has been added to the Twitter api (conversation_id is an optional parameter), it has not been added to Tweepy. I was wondering if anyone was familiar enough with Tweepy that they might know a way …

Total answers: 2

Getting trending topics from Twitter using tweepy. Is there a better way of doing it?

Getting trending topics from Twitter using tweepy. Is there a better way of doing it? Question: #import time import tweepy #import csv import keys #WOEID 455825 auth = tweepy.OAuthHandler(“”, “”) auth.set_access_token(“”, “”) auth = tweepy.OAuthHandler(keys.consumer_key, keys.consumer_secret) auth.set_access_token(keys.access_token, keys.access_token_secret) api = tweepy.API(auth, wait_on_rate_limit = True, wait_on_rate_limit_notify = True) trends_available = api.trends_available() print(f”Number of Trends availables: {len(trends_available)}”) …

Total answers: 1

Post Tweet with YouTube Video URL using Tweepy

Post Tweet with YouTube Video URL using Tweepy Question: I notice that if I Tweet normally (from the browser) with a message followed by a YouTube video link, Twitter displays the video’s thumbnail, as follows: However, if I use the following code to send the Tweet instead: import tweepy import json youtube_url = r’https://www.youtube.com/watch?v=tj-fmOnbBpU&t=0s’ # …

Total answers: 3

Parsing data from JSON (tweepy) into a pandas dataframe

Parsing data from JSON (tweepy) into a pandas dataframe Question: I’ve streamed tweets from Tweepy and stored it as a text file, as such. Now I am looking to convert this into a pandas dataframe but I don’t know how. I’ve tried looking for similar posts here on Stack Overflow and in the pandas documentation …

Total answers: 2

Including filtering-criteria in Tweepy Streaming API

Including filtering-criteria in Tweepy Streaming API Question: I would like to collect all tweets that contain on the following words: Bitcoin, Ethereum, Litecoin or Denarius However, I want to exclude tweets than can be classified as retweets and tweets that contain links. I know from the following website (https://www.followthehashtag.com/help/hidden-twitter-search-operators-extra-power-followthehashtag) that I can add -filter:links to …

Total answers: 1

Get list of followers and following for group of users tweepy

Get list of followers and following for group of users tweepy Question: I was just wondering if anyone knew how to list out the usernames that a twitter user is following, and their followers in two separate .csv cells. This is what I have tried so far. import tweepy import csv consumer_key = “” consumer_secret …

Total answers: 1

Add emoticons in tweet text updated using tweepy

Add emoticons in tweet text updated using tweepy Question: I am creating an auto-DM bot using tweepy. I want to add emojis to the text. Is it possible? I have tried adding ‘ ‘ and :heartpulse::heart_eyes_cat: without luck. Asked By: usama aslam || Source Answers: Adding :heartpulse::heart_eyes_cat: like this doesn’t help. Since emoticons are just …

Total answers: 3

tweepy get tweets between two dates

tweepy get tweets between two dates Question: I have the following code in Python: import tweepy consumer_key = “…” consumer_secret = “…” access_token = “…” access_token_secret = “…” auth = tweepy.OAuthHandler(consumer_key, consumer_secret) auth.set_access_token(access_token, access_token_secret) start_date = datetime.datetime(2018, 1, 19, 12, 00, 00) end_date = datetime.datetime(2018, 1, 19, 13, 00, 00) api = tweepy.API(auth) for tweet …

Total answers: 3

Getting a tweet id from a tweet link using Tweepy

Getting a tweet id from a tweet link using Tweepy Question: I am creating a bot for Reddit that posts a tweet’s text, author, and a couple of other small things on submissions that directly link to the tweet (example – https://twitter.com/John_Yuki_Bot/status/889453450664304641). However, I can’t find anything in the Tweepy documentation that lets me extract …

Total answers: 3

Tweepy Look up ID with username

Tweepy Look up ID with username Question: I am trying to get a list of IDs from a list of usernames I have. Is there any method that tweepy provides that lets me do lookup user IDs using their username? Asked By: Pike D. || Source Answers: Twitter API has the resource https://dev.twitter.com/rest/reference/get/users/lookup for such …

Total answers: 3