ptwobrussell / Mining-the-Social-Web-2nd-Edition

The official online compendium for Mining the Social Web, 2nd Edition (O'Reilly, 2013)
http://bit.ly/135dHfs
Other
2.9k stars 1.49k forks source link

Chaprte 1 Exemple 1.2 its not working #332

Open eleuuterio opened 6 years ago

eleuuterio commented 6 years ago

Im trying to find trending topics in Brasil with the following code:

WORLD_WOE_ID = 1 BR_WOE_ID = 455821

world_trends = twitter_api.trends.place(_id=WORLD_WOE_ID) br_trends = twitter_api.trends.place(_id=BR_WOE_ID)

print(world_trends) print(br_trends)

As output I receive:

<twitter.api.Twitter object at 0x7fa586b56400>

It was suposed to print the trendings as:

[{u'created_at': u'2013-03-27T11:50:40Z', u'trends': [{u'url': u'http://twitter.com/search?q=%23MentionSomeoneImportantForYou'...

The Aouth credentials are working normally. In using Python3 to do it, but the material I'm following uses Python2 (I'm correcting everything by my self and so far everything works as in the book. Except for this part.

Any thoughts?

eleuuterio commented 6 years ago

NEVERMIND, stupid mistake !