首页 > 其他 > 详细

微博展开全文获取

时间:2018-07-20 16:23:39      阅读:210      评论:0      收藏:0      [点我收藏+]
    def getlongtext(self,mid:str,req:requests)->"获取全文逻辑":
        allinfo=None
        getlongtexturl=f"http://s.weibo.com/ajax/direct/morethan140?mid={mid}"
        resp=req.get(getlongtexturl,timeout=60).json()
        okcode=resp["code"]
        if okcode=="100000":
            allinfo=resp["data"]["html"]
        else:
            print("get log text is error,here are detail:{}",traceback.format_exc())
        return allinfo

微博展开全文获取

原文:https://www.cnblogs.com/c-x-a/p/9341992.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!