daily pastebin goal
84%
SHARE
TWEET

Untitled

a guest Feb 12th, 2014 22 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
 
  1. #!/usr/bin/env python
  2.  
  3. import tweepy
  4.  
  5. consumer_key = '*****'
  6. consumer_secret = '******'
  7. access_token = '********'
  8. access_token_secret = '******'
  9.  
  10. auth = tweepy.OAuthHandler(consumer_key, consumer_secret)
  11. auth.set_access_token(access_token, access_token_secret)
  12.  
  13. api = tweepy.API(auth)
  14.  
  15. # List of queries
  16. queries = [             '"Apple"',
  17.                                 '"Apple" since:2011-12-27',
  18.                                 '"Apple" until:2011-12-29',
  19.                                 '"Apple" since:2011-12-27 until:2011-12-29'     ]
  20.  
  21. # Perform search on specific query
  22. query = queries[2]
  23. results = api.search(q=query)
  24.  
  25. # Print results
  26. for result in results:
  27.     print result.text
  28.  
  29. # The exact query that was sent to Twitter API
  30. print "\n" + "\nQuery='" + query + "'"
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Pastebin PRO 'CHRISTMAS SPECIAL'!
Get 60% OFF Pastebin PRO accounts!
 
Top