python - Tweepy user id from mention -


i using tweepy set script finds latest mention of username. this, want retrieve text of tweet, , twitter user name. however, don't seem able retrieve actual @ username, id number. suggestions?

below code. question marks need proper syntax:

mymentions = tweepy.cursor (api.mentions).items(1)  mention in mymentions:     statustext = mention.text     statususer = mention.???? 

thanks much!

here's works me recent tweepy version:

import tweepy  auth = tweepy.oauthhandler(<consumer_key>, <consumer_secret>) auth.set_access_token(<key>, <secret>)  api = tweepy.api(auth)  mentions = api.mentions_timeline(count=1)  mention in mentions:     print mention.text     print mention.user.screen_name 

hope helps.


Comments

Popular posts from this blog

Perl - how to grep a block of text from a file -

delphi - How to remove all the grips on a coolbar if I have several coolbands? -

javascript - Animating array of divs; only the final element is modified -