2012-04-03 76 views
1
How to get the media url for a particular image from a tweet status. 

I am using python-twitter library 0.8. 
statuses = api.GetUserTimeline(count=1, include_entities=True) 

Status structure provided by Twitter is 
    status.created_at 
    status.created_at_in_seconds # read only 
    status.favorited 
    status.in_reply_to_screen_name 
    status.in_reply_to_user_id 
    status.in_reply_to_status_id 
    status.truncated 
    status.source 
    status.id 
    status.text 
    status.location 
    status.relative_created_at # read only 
    status.user 
    status.urls 
    status.user_mentions 
    status.hashtags 
    status.geo 
    status.place 
    status.coordinates 
    status.contributors 

status.text提供了eimahe文本和包含图像的twitter页面url,但我有兴趣获取图像url本身。我在哪里可以得到?python-twitter从状态获取图像

回答

0

api代码不包括状态对象中的媒体节点元素。我们可以重写库或者修改和更新库的git仓库,以确保Status对象也包含媒体元素。