小鲸鱼537318打卡查询python版

avatar 全民淘 2021-09-26 23:15 8次浏览 0 条评论
本站长期域名 xb.qmtao.com ( 目前使用 www.lakk.cn 每年更换 )                

拿小鲸鱼练了一下python。。。破解签名上绕了一下圈。

网页版获取自己账号的请求data,放到py文件中,替换一下自己的server酱姐好啦

server酱点击详情可以看到打卡天数的列表(20210925,20210926….),挂到服务器上每天晚上提醒自己是否打卡成功,对于多设备的可以免去重复查询了。。。。# -*- coding: utf-8 -*-
# @time : 2021/9/25 16:16
# @Author : asqee123456
# @FileName: 小鲸鱼打卡查询.py
# @Software: PyCharm
import requests
import json
import time
import hashlib
import urllib

class Remind(object):
def isSign(self,data):
#获取毫秒时间
tt = str(round(time.time() *1000))
#计算sign
token = ‘appSecret=whalesztJWM4Ps0l&random=10&time=’+tt
sign = hashlib.md5(token.encode(‘utf8’)).hexdigest()
url = ‘https://alpha-proxy.jd.com/clock/qryUserActivity?random=10&time=’+tt
headers = {
‘Host’:’alpha-proxy.jd.com’,
‘Connection’:’keep-alive’,
‘Content-Length’:’108′,
‘Accept’: ‘application/json, text/plain, */*’,
‘User-Agent’: ‘Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1’,
‘sign’: sign,
‘Content-Type’: ‘application/json; charset=UTF-8’,
‘Origin’: ‘https://alpha-proxy.jd.com’,
‘Sec-Fetch-Site’: ‘same-origin’,
‘Sec-Fetch-Mode’: ‘cors’,
‘Sec-Fetch-Dest’: ’empty’,
‘Referer’: ‘https://alpha-proxy.jd.com/clockin/index.html?lng=116.655882&lat=40.124733&sid=1e1d149a7fb357f5476cb0beae78179w&un_area=1_2812_51142_0’,
‘Accept-Encoding’: ‘gzip, deflate, br’,
‘Accept-Language’: ‘zh-CN,zh;q=0.9’,
}
data = {data:”}
res = requests.post(url,headers=headers,data=json.dumps(data))
return res.text

if __name__ == “__main__”:
today = time.strftime(“%Y%m%d”, time.localtime())
remind = Remind()
#自己的sign#
data = ‘#你自己的request payload下参数#’
res = json.loads(remind.isSign(data))
# 获取打卡天数的列表列表
is_sign = 0;
for day in res[‘data’][‘clock_days’]:
if day == today:
is_sign = 1
sign_string = ‘,’.join(res[‘data’][‘clock_days’])
if is_sign == 1:
requests.get(
“https://sc.ftqq.com/#自己的server酱#?text=”+urllib.parse.quote(‘今日打卡成功’)+”&desp=” + sign_string)
else:
requests.get(
‘https://sctapi.ftqq.com/#自己的server酱#?title=’+urllib.parse.quote(‘打卡失败’))

发表评论
请先登录后再评论~