Python 获取新浪微博指定用户的微博列表
来源:互联网 发布:祛痘图片淘宝 编辑:程序博客网 时间:2024/05/16 19:30
CODE:
#!/usr/bin/python # -*- coding: utf-8 -*-'''Created on 2014-7-18@author: guaguastd@name: statusesUserTimeline.py'''if __name__ == '__main__': # import json import json # get weibo_api to access sina api from sinaWeiboLogin import sinaWeiboLogin sinaWeiboApi = sinaWeiboLogin() # import sinaWeoboStatuses from sinaWeiboStatuses import userTimeline # get the new 200 weibo content = userTimeline(sinaWeiboApi, 200) print json.dumps(content, indent=1)
RESULT:
[ { "darwin_tags": [], "favorited": false, "mid": "3731076012679100", "in_reply_to_user_id": "", "truncated": false, "text": "Python \u63d0\u53d6\u65b0\u6d6a\u516c\u5171\u5fae\u535a\u4e2d\u8f6c\u8f7d\u6b21\u6570\u6700\u591a\u7684\u5fae\u535a\u8f6c\u8f7d\u6570\uff0c\u7528\u6237\u540d\uff0c\u5185\u5bb9 http://t.cn/RvFMuci", "created_at": "Fri Jul 11 09:15:04 +0800 2014", "mlevel": 0, "reposts_count": 0, "idstr": "3731076012679100", "visible": { "type": 0, "list_id": 0 }, "attitudes_count": 0, "pic_urls": [], "in_reply_to_screen_name": "", "user": { "bi_followers_count": 0, "domain": "", "avatar_large": "http://tp2.sinaimg.cn/3286717353/180/0/1", "verified_source": "", "ptype": 0, "statuses_count": 4, "allow_all_comment": true, "id": 3286717353, "verified_reason_url": "", "city": "8", "province": "11", "block_app": 0, "follow_me": false, "verified_reason": "", "followers_count": 1, "location": "\u5317\u4eac \u6d77\u6dc0\u533a", "verified_trade": "", "mbtype": 0, "verified_source_url": "", "profile_url": "u/3286717353", "block_word": 0, "avatar_hd": "http://tp2.sinaimg.cn/3286717353/180/0/1", "star": 0, "description": "", "friends_count": 4, "online_status": 1, "mbrank": 0, "allow_all_act_msg": false, "profile_image_url": "http://tp2.sinaimg.cn/3286717353/50/0/1", "idstr": "3286717353", "verified": false, "geo_enabled": true, "class": 1, "screen_name": "beyondzhou8", "lang": "zh-cn", "weihao": "", "remark": "", "favourites_count": 0, "name": "beyondzhou8", "url": "", "gender": "m", "created_at": "Tue Aug 20 00:41:09 +0800 2013", "verified_type": -1, "following": false }, "in_reply_to_status_id": "", "comments_count": 0, "geo": null, "id": 3731076012679100, "source": "<a href=\"http://weibo.com/\" rel=\"nofollow\">\u5fae\u535a weibo.com</a>" }, { "darwin_tags": [], "favorited": false, "mid": "3730684251828947", "in_reply_to_user_id": "", "truncated": false, "text": "Python \u5bf9\u65b0\u6d6a\u5fae\u535a\u7684\u5143\u7d20 (Word, Screen Name)\u7684\u8bcd\u6c47\u591a\u6837\u6027\u5206\u6790 http://t.cn/Rvk5vp3", "created_at": "Thu Jul 10 07:18:21 +0800 2014", "mlevel": 0, "reposts_count": 0, "idstr": "3730684251828947", "visible": { "type": 0, "list_id": 0 }, "attitudes_count": 0, "pic_urls": [], "in_reply_to_screen_name": "", "user": { "bi_followers_count": 0, "domain": "", "avatar_large": "http://tp2.sinaimg.cn/3286717353/180/0/1", "verified_source": "", "ptype": 0, "statuses_count": 4, "allow_all_comment": true, "id": 3286717353, "verified_reason_url": "", "city": "8", "province": "11", "block_app": 0, "follow_me": false, "verified_reason": "", "followers_count": 1, "location": "\u5317\u4eac \u6d77\u6dc0\u533a", "verified_trade": "", "mbtype": 0, "verified_source_url": "", "profile_url": "u/3286717353", "block_word": 0, "avatar_hd": "http://tp2.sinaimg.cn/3286717353/180/0/1", "star": 0, "description": "", "friends_count": 4, "online_status": 1, "mbrank": 0, "allow_all_act_msg": false, "profile_image_url": "http://tp2.sinaimg.cn/3286717353/50/0/1", "idstr": "3286717353", "verified": false, "geo_enabled": true, "class": 1, "screen_name": "beyondzhou8", "lang": "zh-cn", "weihao": "", "remark": "", "favourites_count": 0, "name": "beyondzhou8", "url": "", "gender": "m", "created_at": "Tue Aug 20 00:41:09 +0800 2013", "verified_type": -1, "following": false }, "in_reply_to_status_id": "", "comments_count": 0, "geo": null, "id": 3730684251828947, "source": "<a href=\"http://weibo.com/\" rel=\"nofollow\">\u5fae\u535a weibo.com</a>" }, { "darwin_tags": [], "favorited": false, "mid": "3730665490725827", "in_reply_to_user_id": "", "truncated": false, "text": "Python \u5bf9Twitter\u4e2d\u6307\u5b9a\u8bdd\u9898\u7684\u88ab\u8f6c\u8f7dTweet\u6570\u91cf\u7684\u9891\u8c31\u5206\u6790 http://t.cn/RvkGP6L", "created_at": "Thu Jul 10 06:03:48 +0800 2014", "mlevel": 0, "reposts_count": 0, "idstr": "3730665490725827", "visible": { "type": 0, "list_id": 0 }, "attitudes_count": 0, "pic_urls": [], "in_reply_to_screen_name": "", "user": { "bi_followers_count": 0, "domain": "", "avatar_large": "http://tp2.sinaimg.cn/3286717353/180/0/1", "verified_source": "", "ptype": 0, "statuses_count": 4, "allow_all_comment": true, "id": 3286717353, "verified_reason_url": "", "city": "8", "province": "11", "block_app": 0, "follow_me": false, "verified_reason": "", "followers_count": 1, "location": "\u5317\u4eac \u6d77\u6dc0\u533a", "verified_trade": "", "mbtype": 0, "verified_source_url": "", "profile_url": "u/3286717353", "block_word": 0, "avatar_hd": "http://tp2.sinaimg.cn/3286717353/180/0/1", "star": 0, "description": "", "friends_count": 4, "online_status": 1, "mbrank": 0, "allow_all_act_msg": false, "profile_image_url": "http://tp2.sinaimg.cn/3286717353/50/0/1", "idstr": "3286717353", "verified": false, "geo_enabled": true, "class": 1, "screen_name": "beyondzhou8", "lang": "zh-cn", "weihao": "", "remark": "", "favourites_count": 0, "name": "beyondzhou8", "url": "", "gender": "m", "created_at": "Tue Aug 20 00:41:09 +0800 2013", "verified_type": -1, "following": false }, "in_reply_to_status_id": "", "comments_count": 0, "geo": null, "id": 3730665490725827, "source": "<a href=\"http://weibo.com/\" rel=\"nofollow\">\u5fae\u535a weibo.com</a>" }, { "darwin_tags": [], "favorited": false, "mid": "3687339672990740", "in_reply_to_user_id": "", "truncated": false, "text": "Hi", "created_at": "Wed Mar 12 16:42:28 +0800 2014", "mlevel": 0, "reposts_count": 3, "idstr": "3687339672990740", "visible": { "type": 0, "list_id": 0 }, "attitudes_count": 0, "pic_urls": [], "in_reply_to_screen_name": "", "user": { "bi_followers_count": 0, "domain": "", "avatar_large": "http://tp2.sinaimg.cn/3286717353/180/0/1", "verified_source": "", "ptype": 0, "statuses_count": 4, "allow_all_comment": true, "id": 3286717353, "verified_reason_url": "", "city": "8", "province": "11", "block_app": 0, "follow_me": false, "verified_reason": "", "followers_count": 1, "location": "\u5317\u4eac \u6d77\u6dc0\u533a", "verified_trade": "", "mbtype": 0, "verified_source_url": "", "profile_url": "u/3286717353", "block_word": 0, "avatar_hd": "http://tp2.sinaimg.cn/3286717353/180/0/1", "star": 0, "description": "", "friends_count": 4, "online_status": 1, "mbrank": 0, "allow_all_act_msg": false, "profile_image_url": "http://tp2.sinaimg.cn/3286717353/50/0/1", "idstr": "3286717353", "verified": false, "geo_enabled": true, "class": 1, "screen_name": "beyondzhou8", "lang": "zh-cn", "weihao": "", "remark": "", "favourites_count": 0, "name": "beyondzhou8", "url": "", "gender": "m", "created_at": "Tue Aug 20 00:41:09 +0800 2013", "verified_type": -1, "following": false }, "in_reply_to_status_id": "", "comments_count": 3, "geo": null, "id": 3687339672990740, "source": "<a href=\"http://weibo.com/\" rel=\"nofollow\">\u5fae\u535a weibo.com</a>" }]
0 0
- Python 获取新浪微博指定用户的微博列表
- Python:获取新浪微博用户的收听列表和粉丝列表
- 新浪微博接口,获取用户粉丝列表
- 获取某条新浪微博的所有转发用户列表(使用repost_timeline接口)
- 新浪微博Python SDK笔记——获取粉丝列表或关注列表
- Python:读取新浪微博收听列表
- python调用新浪微博API爬取用户的好友列表(windows 64位,pyCharm)
- python获取新浪微博授权
- Python 获取新浪微博的最新公共微博
- Python 获取新浪微博的热门话题 (API)
- 微博 获取指定用户发表的所有微博
- 新浪微博api 用户标签获取 java
- ios-新浪微博开发-21-获取用户昵称
- Android授权登录新浪微博获取用户个人信息
- 如何利用新浪微博开放平台API获取新浪微博用户数据
- 新浪微博数据挖掘食谱之九: 用户篇 (获取转发微博的用户名)
- 新浪微博数据挖掘食谱之十三: 微博篇 (批量获取用户的微博)
- web前端-获取用户的来源是否为新浪微博
- java HashMap需要注意的一些地方
- POJ1201(查分约束)
- ZOJ2976暴力法
- Apache Kafka 分布式消息队列中间件安装与配置
- 在windows, linux平台上安装 libsvm (matlab版本)
- Python 获取新浪微博指定用户的微博列表
- Centos 6.5 yum快速升级、修复OpenSSL heartbleed漏洞
- java使用反射调用set和get方法
- Map.entry优势
- 使用sortedArrayUsingSelector:方法排序数组中的元素
- POJ3126——Prime Path
- Codeforces 448 D. Multiplication Table
- Codeforces Round #256 (Div. 2) B
- 面试算法(四十)数组中只出现一次的数字