twitter

Load twitter posts from different users

早过忘川 提交于 2020-07-22 21:52:10
问题 Hi need to load twitter posts from different users . I know how to load post from single user. Perform request with search query FROM:<username> . Do you know the way how to load posts from different users? I tried something like this FROM:<username1>&&<username2> - but it doesn't work. Any ideas? 回答1: You can make use of TwitterKit framework which is available in cocoapods GitHub - https://github.com/twitter/twitter-kit-ios/wiki/Access-Twitter's-REST-API Cocoapods - https://cocoapods.org

Get latest direct message from Twitter using python/Tweepy

被刻印的时光 ゝ 提交于 2020-07-22 21:33:08
问题 I've just started using Tweepy and I'm trying to build a pretty simple bot that will use Twitter to automate a few things in my home (mostly for fun and to learn Tweepy). I've gone through the Tweepy docs and can't find out how to retrieve the latest direct message from my own account without knowing the message ID. I'm assuming I can use the API.get_direct_messages() method but it requires a message ID (which I don't know). Can anyone clue me in to the proper way to do this? I'm using

Unable to stop Streaming in tweepy after one minute

|▌冷眼眸甩不掉的悲伤 提交于 2020-07-17 02:29:48
问题 I am trying to stream twitter data for a period of time of say 5 minutes, using the Stream.filter() method. I am storing the retrieved tweets in a JSON file. The problem is I am unable to stop the filter() method from within the program. I need to stop the execution manually. I tried stopping the data based on system time using the time package. I was able to stop writing tweets to the JSON file but the stream method is still going on, but It was not able to continue to the next line of code.

how to get only the text of the tweets into a json file

寵の児 提交于 2020-07-09 11:56:07
问题 So i am working on a project using twitterAPI for tweet collection of different keywords using specific longitude and latitudes. I crawled the data for my tweets the data is a list of dictionares for each key word containing fields such as: dict_keys(['created_at', 'id', 'id_str', 'text', 'truncated', 'entities', 'extended_entities', 'metadata', 'source', 'in_reply_to_status_id', 'in_reply_to_status_id_str', 'in_reply_to_user_id', 'in_reply_to_user_id_str', 'in_reply_to_screen_name', 'user',

how to get only the text of the tweets into a json file

这一生的挚爱 提交于 2020-07-09 11:56:07
问题 So i am working on a project using twitterAPI for tweet collection of different keywords using specific longitude and latitudes. I crawled the data for my tweets the data is a list of dictionares for each key word containing fields such as: dict_keys(['created_at', 'id', 'id_str', 'text', 'truncated', 'entities', 'extended_entities', 'metadata', 'source', 'in_reply_to_status_id', 'in_reply_to_status_id_str', 'in_reply_to_user_id', 'in_reply_to_user_id_str', 'in_reply_to_screen_name', 'user',

How to copy following list of a twitter account [closed]

南笙酒味 提交于 2020-06-29 06:42:39
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 17 hours ago . Improve this question I want to copy the following list of a Twitter account. Web tools are available but they are paid. How can I do this for free? For example elon musk on Twitter is following 91 people . Here is a screenshot of how Twitter shows a list of whom they are

Twitter profile picture images now blocked on most domains

帅比萌擦擦* 提交于 2020-06-29 04:14:11
问题 Based upon this answer here: Building Twitter profile image url with Twitter user id I implemented some functionality for a client's website that showed a Twitter profile picture's img so it could be displayed on our site. ( https://twitter.com/[screen_name]/profile_image?size=original ) Unfortunately after coming back to the project after a couple weeks it looks like Twitter has now blocked this functionality. Looking at the response headers I see: After poking around a bit it looks like the

Tweepy: How can I get more than 20 tweets from a user?

♀尐吖头ヾ 提交于 2020-06-16 06:47:30
问题 According to their docs: API.user_timeline([id/user_id/screen_name][, since_id][, max_id][, count][, page]) Returns the 20 most recent statuses posted from the authenticating user or the user specified. It’s also possible to request another user’s timeline via the id parameter. So how can I get more than 20 tweets from a person's timeline? The docs do not show how...Does that user need to be authenticated? 回答1: You can make use of pages parameter in API.user_timeline([id/user_id/screen_name][

How do I pull tweets from a user for specific dates on python?

て烟熏妆下的殇ゞ 提交于 2020-05-30 08:13:31
问题 I am trying to download tweets from the Reuters (@reuters) twitter account for the month of November 2019. I am using tweepy on python and this is my code: pip install tweepy import tweepy as tw #Keys consumer_key = "..." consumer_secret = "..." access_token = "..." access_token_secret = "..." # Login auth = tw.OAuthHandler(consumer_key, consumer_secret) auth.set_access_token(access_token, access_token_secret) api = tw.API(auth, wait_on_rate_limit=True) #Get user's tweets tweets = tw.Cursor

How to make this script loop every hour

守給你的承諾、 提交于 2020-05-24 06:03:27
问题 I'm creating a bot that posts every 60 minutes covid numbers, I have it finished but idk how to make it repeat. Any idea? It's a little project that I have in mind and it's the last thing I have to do. (if you answer the code from the publication with inside the solution it would be very cool) import sys CONSUMER_KEY = 'XXXX' CONSUMER_SECRET = 'XXXX' ACCESS_TOKEN = 'XXXX' ACCESS_TOKEN_SECRET = 'XXXX' import tweepy import requests from lxml import html def create_tweet(): response = requests