I'm using a library for using Twitter Api with python,
#Get the first tweet of Timeline
status = api.home_timeline()[0].text
I was taking the value, but I wanted a value other than text, so I looked it up and made a list, so I'll put a note on it.
Model name: MacBook Pro OS : Yosemite 10.10.5 Processor name: Intel Core i5 2.6 GHz Memory: 16 GB Graphics: Intel Iris 1536MB
python 2.7.12 Tweepy 3.5.0
Eh
status = api.home_timeline()[0]
print dir(status)
parameter | Overview | Example |
---|---|---|
__class__ | Class object | <class 'tweepy.models.Status'> |
__delattr__ | delattr object | <method-wrapper '__delattr__' of Status object at 0x1084881d0> |
__dict__ | json data | |
__doc__ | None | |
__eq__ | json data | |
__format__ | format object | <built-in method __format__ of Status object at 0x101a1efd0> |
__getattribute__ | getattribute object | <method-wrapper '__getattribute__' of Status object at 0x101a1efd0> |
__getstate__ | ||
__hash__ | Hash object | <method-wrapper '__hash__' of Status object at 0x10c0b51d0> |
__init__ | ||
__module__ | module | tweepy.models |
__ne__ | ne object | |
__new__ | new object | <built-in method __new__ of type object at 0x10ab01ab0> |
__reduce__ | Reduce object | <built-in method __reduce__ of Status object at 0x10bb5df50> |
__reduce_ex__ | Reduce object(Expansion) | <built-in method __reduce_ex__ of Status object at 0x10bb5df50> |
__repr__ | repr object | |
__setattr__ | setattr object | <method-wrapper '__setattr__' of Status object at 0x106543150> |
__sizeof__ | sizeof object | <built-in method __sizeof__ of Status object at 0x106543150> |
__str__ | str object | <method-wrapper '__str__' of Status object at 0x106543150> |
__subclasshook__ | Subclass hook object | <built-in method __subclasshook__ of type object at 0x7f9c81534cc0> |
__weakref__ | weak...reference? | None |
_api | API | <tweepy.api.API object at 0x106222190> |
_json | Data organized in json format | |
author | ||
contributors | None | |
coordinates | None | |
created_at | Time made | 2016-08-02 10:00:00 |
destroy | ||
entities | {u'symbols': [], u'user_mentions': [], u'hashtags': [], u'urls': []} | |
extended_entities | ||
favorite | ||
favorite_count | Number of loved | 0 |
favorited | Whether you loved | False |
geo | None | |
id | Tweet identification ID | 123456789012345678 |
id_str | Tweet identification ID(String?) | 123456789012345678 |
in_reply_to_screen_name | None | |
in_reply_to_status_id | None | |
in_reply_to_status_id_str | None | |
in_reply_to_user_id | None | |
in_reply_to_user_id_str | None | |
is_quote_status | Quoted(Was it done?)whether | False |
lang | language | ja |
parse | <bound method type.parse of <class 'tweepy.models.Status'>> |
|
parse_list | <bound method type.parse_list of <class 'tweepy.models.Status'>> |
|
place | location information | None |
possibly_sensitive | ||
possibly_sensitive_appealable | ||
retweet | ||
retweet_count | Number of retweets | 0 |
retweeted | Whether you retweet | False |
retweeted_status | ||
retweets | ||
source | Twitter client | Twitter for iPhone |
source_url | Twitter client URL | http://twitter.com/download/iphone |
text | Tweet content | I'm hungry, I want to go home |
truncated | Was it truncated? | False |
user |
If you can fill in the blanks, it would be helpful if you could tell me. Please press even if the explanation is wrong.
Big, I think I should just dir () the object for the time being.
You have no intention?
#username
print status.user.name
#User ID
print status.user.screen_name
#Whether it is a key
print status.user.protected
#Where you live
print status.user.location
Tweepy Documentation http://docs.tweepy.org/en/v3.5.0/