tweepy

Specify exact time to start and end the collection of tweets using Python Tweepy?

天大地大妈咪最大 提交于 2020-01-05 11:38:50
问题 I am having quite a bit of technical issues. My python script below usually works (when time is in yyyy-mm-dd' format. But during the extremely heavy tweet activities, for example more than 500,000 tweets collected a day, my computer runs out of memory and have to force stop the program. I can work around by looking at the time of the last tweets in the stopped csv file, in this case it's at time 18:44:00. I have tried many time format (for example 'yyyy-mm-dd hh:mm:ss' format as below) but

Specify exact time to start and end the collection of tweets using Python Tweepy?

时光毁灭记忆、已成空白 提交于 2020-01-05 11:38:27
问题 I am having quite a bit of technical issues. My python script below usually works (when time is in yyyy-mm-dd' format. But during the extremely heavy tweet activities, for example more than 500,000 tweets collected a day, my computer runs out of memory and have to force stop the program. I can work around by looking at the time of the last tweets in the stopped csv file, in this case it's at time 18:44:00. I have tried many time format (for example 'yyyy-mm-dd hh:mm:ss' format as below) but

tweepy stream.filter() method doesn't work properly

我怕爱的太早我们不能终老 提交于 2020-01-05 11:34:13
问题 i've got some problems with the tweepy api. I'm just tryin to write a little app that gets me a stream of statuses of one user (ore more), but one would be fine to start with ;-) now: my code is like that: def main(): config = ConfigParser.ConfigParser() config.read('twitter.cfg') username = config.get('Twitter', 'username') password = config.get('Twitter', 'password') listener = StreamWatcherListener() stream = tweepy.Stream(username, password, listener, timeout=None) stream.filter(

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

给你一囗甜甜゛ 提交于 2020-01-04 01:50:33
问题 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 Collecting install Could not find a version that satisfies the requirement install (from versions: ) No matching distribution found for install Edit-1 I tried to install python-twitter module and the same error shows up. C:\Python36>pip install python-twitter -v Config variable 'Py_DEBUG' is unset, Python

tweepy Not Authorized - tweepy.error.TweepError: Not authorized

六月ゝ 毕业季﹏ 提交于 2020-01-03 10:54:51
问题 I get the following error when I try to use tweepy for twitter authentication. File "/usr/local/lib/python2.7/dist-packages/tweepy/models.py", line 146, in followers return self._api.followers(user_id=self.id, **kargs) File "/usr/local/lib/python2.7/dist-packages/tweepy/binder.py", line 197, in _call return method.execute() File "/usr/local/lib/python2.7/dist-packages/tweepy/binder.py", line 173, in execute raise TweepError(error_msg, resp) tweepy.error.TweepError: Not authorized. I am not

Twitter api searching tweets for hashtags

﹥>﹥吖頭↗ 提交于 2020-01-03 03:34:29
问题 I am new to twitter api and I have spend tremendous amount of time trying to figure this out. I would like to extract a large number (100k - 1m) of tweets for a given search term from most recent tweets. I tried working with tweepy and I was able to setup a stream but I need the data from past as well. I also tried following code but it only gives me 100 at a time and I don't understand how to use since_id and max_id to run through past tweets. Also if someone knows how to extract hashtags

Tweepy tracking terms and following users

我怕爱的太早我们不能终老 提交于 2020-01-01 18:51:08
问题 I'm trying to build an app to track some terms from specifics users using the streaming twitter API. I made a working python script using tweepy for the streaming api based on this tutorial. But, it's only working if I track tweets by terms or by user ids, but now by both. When I try to search using both of them, the api returns me tweets from any user. My code is here: #Acessando a API do twitter com as chaves auth = tweepy.OAuthHandler(consumer_key, consumer_secret) auth.set_access_token

Query regarding pagination in tweepy (get_followers) of a particular twitter user

穿精又带淫゛_ 提交于 2020-01-01 00:39:20
问题 I am fairly new to tweepy and pagination using the cursor class. I have been trying to user the cursor class to get all the followers of a particular twitter user but I keep getting the error where it says "tweepy.error.TweepError: This method does not perform pagination" Hence I would really appreciate any help if someone could please help me achieve this task of obtaining all the followers of a particular twitter user with pagination, using tweepy. The code I have so far is as follows:

tweepy stream to sqlite database - syntax error [duplicate]

你说的曾经没有我的故事 提交于 2019-12-31 05:18:08
问题 This question already has answers here : Closed 7 years ago . Possible Duplicate: tweepy stream to sqlite database - invalid synatx I'm getting a syntax error in my code and I can't figure out what's causing it. This is the error the console is returning and nothing is being inputed to the sqlite file. Filtering the public timeline for "@lunchboxhq" RT @LunchboxHQ: @lunchboxhq test1 LunchboxHQ 2012-02-27 17:26:14 Echofon Encountered Exception: near "?": syntax error @LunchboxHQ test 1

Python script receiving a UnicodeEncodeError: 'ascii' codec can't encode character

北慕城南 提交于 2019-12-31 05:12:37
问题 I have a simple Python script that pulls posts from reddit and posts them on Twitter. Unfortunately, tonight it began having issues that I'm assuming are because of someone's title on reddit having a formatting issue. The error that I'm reciving is: File "redditbot.py", line 82, in <module> main() File "redditbot.py", line 64, in main tweeter(post_dict, post_ids) File "redditbot.py", line 74, in tweeter print post+" "+post_dict[post]+" #python" UnicodeEncodeError: 'ascii' codec can't encode