Возможно ли преобразовать вывод api json из твиттера в csv / xls, используя python? - PullRequest
0 голосов
/ 16 января 2012

Таким образом, при вызове последнего твита пользователя («твиттер»)

https://api.twitter.com/1/statuses/user_timeline.json?include_entities=true&contributor_details&include_rts=true&screen_name=twitter&count=1

Twitter.com возвращает следующее:

[{"entity": {"hashtags": [], "user_mentions": [{"name": "Fox News", "indices": [18,26], "screen_name": "FoxNews", "id_str": "1367531", "id": 1367531}], "urls": [{"url": "http://t.co/p2Yi7pLt","indices":[78,98],"display_url":"blog.twitter.com/2012/01/using-\u2026","expanded_url":"http://blog.twitter.com/2012/01/using-twitter-to-follow-political.html"}]},"coordinates":null,"truncated":false,"place":null,"geo":null,"in_reply_to_user_id":null,"retweet_count":"100+","favorited":false,"in_reply_to_status_id_str":null,"user":{"contributors_enabled":true,"lang":"en","profile_background_image_url_https":"https://si0.twimg.com/profile_background_images/378245879/Twitter_1544x2000.png","favourites_count":16,"profile_text_color":"333333","protected":false,"location":"San Francisco, CA", "is_translator": false, "profile_background_image_url": "http://a1.twimg.com/profile_background_images/378245879/Twitter_1544x2000.png","profile_image_url_https":"https://si0.twimg.com/profile_images/1124040897/at-twitter_normal.png","name":"Twitter","profile_link_color":"038543","url":"http://blog.twitter.com/","utc_offset":-28800,"description":"Always wondering что происходит. "," named_count ": 68037," profile_background_color ":" ACDED6 "," statuses_count ": 1246," follow ": true," profile_background_tile ": true," follow_count ": 7355581," profile_image_url ":" http://a0.twimg.com/profile_images/1124040897/at-twitter_normal.png","profile_banner_url":"https://si0.twimg.com/brand_banners/twitter/1323368512/live","default_profile":false,"geo_enabled":true,"created_at":"Tue 20 февраля 14:35:54 +0000 2007 "," profile_sidebar_fill_color ":" F6F6F6 "," show_all_inline_media ": true," follow_request_sent ": false," notifications ": false," friends_count ": 754," profile_sidebar_border_color ":" EEEEEE "," screen_name ":" twitter "," id_str ":" 783214 "," Verified ": true," id ": 783214," default_profile_image ": false," profile_use_background_image ": true," time_zone ":" Pacific Time (США и Канада) "}, "ally_sensitive": false, "in_reply_to_screen_name": null, "creation_at": "Mon Jan 16 04:33:23 +0000 2012", "in_reply_to_user_id_str": null, "retweeted": false, "источник" : "web", "id_str": "158768787494146048", "in_reply_to_status_id": null, "id": 158768787494146048, "contributors": [22824309], "text": "Завтра вечером в @FoxNews - вот как следует следовать и твитнуть о дискуссии: http://t.co/p2Yi7pLt"}]

Могу ли я преобразовать это в CSV / XLS с помощью Python?

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...