mirror of
https://github.com/linbailo/zyqinglong.git
synced 2026-01-12 03:00:43 +08:00
更新月代码获取方式
This commit is contained in:
parent
b6e4a7e0c2
commit
c623a6f15d
24
tsthb.py
24
tsthb.py
@ -18,11 +18,12 @@ import re
|
||||
import os
|
||||
import time
|
||||
import json
|
||||
from datetime import datetime
|
||||
#初始化
|
||||
print('============📣初始化📣============')
|
||||
#版本
|
||||
github_file_name = 'tsthb.py'
|
||||
sjgx = '2025-04-17T21:30:11.000+08:00'
|
||||
sjgx = '2025-05-10T21:30:11.000+08:00'
|
||||
version = '1.46.8'
|
||||
|
||||
try:
|
||||
@ -33,6 +34,14 @@ except Exception as e:
|
||||
print('小错误')
|
||||
|
||||
|
||||
# 获取日期距离计算id
|
||||
def months_between_dates(d1):
|
||||
d2 = datetime.today()
|
||||
d1 = datetime.strptime(d1, "%Y-%m-%d")
|
||||
months = (d2.year - d1.year) * 12 + d2.month - d1.month
|
||||
return months
|
||||
|
||||
|
||||
|
||||
# 发送通知消息
|
||||
def send_notification_message(title):
|
||||
@ -79,6 +88,13 @@ def qdsj(ck):
|
||||
# activityId = re.findall('activityId%2522%253A(.*?)%257D',qd)[0]
|
||||
print(f"获取到本月签到代码:{activityId}")
|
||||
#activityId = json.loads(qd)['activityId']
|
||||
elif '签到' in i['bannerName']:
|
||||
# print(i)
|
||||
qd = i['jumpPara']
|
||||
activityId = json.loads(qd)['activityId']
|
||||
# activityId = re.findall('activityId%2522%253A(.*?)%257D',qd)[0]
|
||||
print(f"获取到本月签到代码:{activityId}")
|
||||
#activityId = json.loads(qd)['activityId']
|
||||
return activityId
|
||||
|
||||
|
||||
@ -90,7 +106,11 @@ def yx(ck):
|
||||
except Exception as e:
|
||||
activityId = ''
|
||||
if activityId == '':
|
||||
activityId = 57
|
||||
danqryid = 59
|
||||
d1 = "2025-05-01"
|
||||
months = months_between_dates(d1)
|
||||
activityId = danqryid + int(months)
|
||||
|
||||
headers = {'user-token':ck,'version':version,'channel':'1'}
|
||||
dl = requests.get(url='https://sss-web.tastientech.com/api/intelligence/member/getMemberDetail',headers=headers).json()
|
||||
if dl['code'] == 200:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user