Update Examples and LICENSE
Some examples were out of date (any trends example) Renamed the core_examples dir. to examples
This commit is contained in:
parent
bb019d3a57
commit
4ac6436901
14 changed files with 44 additions and 67 deletions
12
examples/search_results.py
Normal file
12
examples/search_results.py
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
from twython import Twython, TwythonError
|
||||
|
||||
# Requires Authentication as of Twitter API v1.1
|
||||
twitter = Twython(APP_KEY, APP_SECRET, OAUTH_TOKEN, OAUTH_TOKEN_SECRET)
|
||||
try:
|
||||
search_results = twitter.search(q="WebsDotCom", rpp="50")
|
||||
except TwythonError as e:
|
||||
print e
|
||||
|
||||
for tweet in search_results["results"]:
|
||||
print "Tweet from @%s Date: %s" % (tweet['from_user'].encode('utf-8'),tweet['created_at'])
|
||||
print tweet['text'].encode('utf-8'),"\n"
|
||||
Loading…
Add table
Add a link
Reference in a new issue