Example #1
0
from twython import Twython
usuario = "ajamaica"
twitter = Twython()
followers = twitter.getFollowersIDs( screen_name = usuario )

for follower_id in followers :
    print "Usuarios %d sigue a %s" % (follower_id, usuario)

tweets = twitter.getPublicTimeline()

for tweet in tweets :
    print tweet['user']['name'].encode('utf-8')
    print tweet['text'].encode('utf-8')

results = twitter.getDailyTrends()

for i in range(0,100) :
    print i

for time, trend_list in results['trends'].iteritems() :
    print time
    for trend in trend_list :
        print trend['query']
Example #2
0
from twython import Twython

usuario = "andrey"  #definimos una variable
twitter = Twython()  #creamos un objeto la clase Twython

followers = twitter.getFollowersIDs(
    screen_name=usuario)  #traemos los usuarios muy facil

for follower_id in followers:
    print "Usuario %d sigue a %s" % (follower_id, usuario)

tweets = twitter.getPublicTimeline()  #traemos los twees

for tweet in tweets:
    print tweet['user']['name'].encode('utf-8')
    print tweet['text'].encode('utf-8')

results = twitter.getDailytrends()  #usando el objeto usamos ese metodo

#esto se llama o se dice iterar objetos
for time, trend_list in results['trends'].iteritems():
    print time
    for trend in trend_list:
        print trend['query']
Example #3
0
from twython import Twython

# Getting the public timeline requires no authentication, huzzah
twitter = Twython()
public_timeline = twitter.getPublicTimeline()

for tweet in public_timeline:
    print tweet["text"]
Example #4
0
from twython import Twython
usuario = "ajamaica"
twitter = Twython()
followers = twitter.getFollowersIDs(screen_name=usuario)

for follower_id in followers:
    print "Usuarios %d sigue a %s" % (follower_id, usuario)

tweets = twitter.getPublicTimeline()

for tweet in tweets:
    print tweet['user']['name'].encode('utf-8')
    print tweet['text'].encode('utf-8')

results = twitter.getDailyTrends()

for i in range(0, 100):
    print i

for time, trend_list in results['trends'].iteritems():
    print time
    for trend in trend_list:
        print trend['query']
Example #5
0
from twython import Twython

usuario = "andrey"#definimos una variable 
twitter = Twython()#creamos un objeto la clase Twython

followers = twitter.getFollowersIDs( screen_name = usuario)#traemos los usuarios muy facil

for follower_id in followers:
	print "Usuario %d sigue a %s"%(follower_id,usuario)

tweets = twitter.getPublicTimeline()#traemos los twees

for tweet in tweets:
	print tweet['user']['name'].encode('utf-8')
	print tweet['text'].encode('utf-8')


results = twitter.getDailytrends()#usando el objeto usamos ese metodo

#esto se llama o se dice iterar objetos
for time, trend_list in results['trends'].iteritems():
	print time
	for trend in trend_list:
		print trend['query']
Example #6
0
from twython import Twython

# Getting the public timeline requires no authentication, huzzah
twitter = Twython()
public_timeline = twitter.getPublicTimeline()

for tweet in public_timeline:
	print tweet["text"]