When I’m crawling the tweets, I used the Tweepy.
I tried to search some tweets when they were written past periods (e.g. 2014.7.1 to 2014.7.31)
My python code is below.
from tweepy import Stream
from tweepy import OAuthHandler
from tweepy.streaming import StreamListener
import tweepy
import time
ckey ='x'
csecret = 'x'
atoken = 'x'
asecret ='x'
auth = tweepy.OAuthHandler(ckey, csecret)
auth.set_access_token(atoken, asecret)
api = tweepy.API(auth)
for tweet in tweepy.Cursor(api.search,q='test',since='2014-07-01',until='2014-07-31').items():
print tweet.text
However, after compiling, I got this errors
Traceback (most recent call last):
File "D:\workplace\twitter_crawler\src\twitter_crawler_main.py", line 98, in <module>
for tweet in tweepy.Cursor(api.search,q='name', since='2014-07-01',until='2014-07-31').items():
File "build\bdist.win32\egg\tweepy\cursor.py", line 181, in next
File "build\bdist.win32\egg\tweepy\cursor.py", line 101, in next
AttributeError: 'function' object has no attribute '__self__'
How can I fix the AttributeErrors, could you help me my problems? Thanks for reading.