admin 2020-5-5 全自动采集舔狗日志到handsome时光机著作权归作者所有。 商业转载请联系作者获得授权,非商业转载请注明出处。 作者:憶の年 链接:https://www.529i.com/archives/2842.html 来源:https://www.529i.com/ #!/usr/bin/python # -*- coding: utf-8 -*- import requests import hashlib url = "https://v1.alapi.cn/api/dog" #舔狗api payload = "format=text" headers = {'Content-Type': "application/x-www-form-urlencoded"} response = requests.request("POST", url, data=payload, headers=headers) dog=response.text key = '121111' #时光机验证编码 s = requests.Session() def getmd5(s): return hashlib.md5(s.encode('utf-8')).hexdigest() date = { "action": "send_talk", "time_code": getmd5(str(key)), "cid": "146", #时光机cid "token":"crx", #识别浏览器还是微信改成其他的不显示 "content": dog, #发送文字 "msg_type": "text", "mediaId": "1" } url = 'https://cdn.529i.com/' req = s.post(url=url,data=date) print(req.text)