pc端

    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

h5端

    def getlongtext(self,mid:str,req:requests)->"获取全文逻辑":
        allinfo=None
        getlongtexturl=f"https://m.weibo.cn/statuses/extend?id={mid}"
        resp=req.get(getlongtexturl,timeout=60).json()
        okcode=resp["ok"]
        if okcode==1:
            allinfo=resp["data"]["longTextContent"]
        else:
            print("get log text is error,here are detail:{}",traceback.format_exc())
        return allinfo

相关文章:

  • 2021-08-31
  • 2021-12-04
  • 2022-03-01
  • 2022-12-23
  • 2021-09-29
  • 2021-08-31
  • 2021-07-22
  • 2022-12-23
猜你喜欢
  • 2021-04-26
  • 2022-12-23
  • 2021-06-17
  • 2021-08-31
  • 2021-11-07
相关资源
相似解决方案