全自动采集舔狗日志到handsome时光机

#!/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://www.529i.com/'
req = s.post(url=url,data=date)
print(req.text)
如果觉得我的文章对你有用,请随意赞赏