Python 获取新浪微博的最新公共微博实例分享
2018-10-15 17:15
阅读:436
API:
statuses/public_timeline 返回最新的200条公共微博,返回结果非完全实时
CODE:
#!/usr/bin/python # -*- coding: utf-8 -*- Created on 2014-7-3 @author: guaguastd @name: statuses_public_timeline.py def public_timeline(weibo_api, count): #public_timeline = weibo_api.statuses.public_timeline.get(count=count) public_timeline = weibo_api.statuses__public_timeline(count=count) statuses = public_timeline[statuses] return statuses if __name__ == __main__: # import json import json # import login, from login import weibo_login # get the twitter access api weibo_api = weibo_login() # get the new 200 weibo content = public_timeline(weibo_api, 200) print json.dumps(content, indent=1)
RESULT:
原文地址:
文章来自:搜素材网的编程语言模块,转载请注明文章出处。
文章标题:Python 获取新浪微博的最新公共微博实例分享
文章链接:http://soscw.com/index.php/essay/18495.html
文章标题:Python 获取新浪微博的最新公共微博实例分享
文章链接:http://soscw.com/index.php/essay/18495.html
评论
亲,登录后才可以留言!