Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env 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)
- api = tweepy.API(auth)
- # List of queries
- queries = [ '"Apple"',
- '"Apple" since:2011-12-27',
- '"Apple" until:2011-12-29',
- '"Apple" since:2011-12-27 until:2011-12-29' ]
- # Perform search on specific query
- query = queries[2]
- results = api.search(q=query)
- # Print results
- for result in results:
- print result.text
- # The exact query that was sent to Twitter API
- print "\n" + "\nQuery='" + query + "'"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement