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

c++ - Function signature as a function template parameter -

algorithm - What are some ways to combine a number of (potentially incompatible) sorted sub-sets of a total set into a (partial) ordering of the total set? -

How to call a javascript function after the page loads with a chrome extension? -