mirror of
https://github.com/daiyanan1992/qinglongtest
synced 2025-12-19 16:24:47 +08:00
15天28天抽奖
This commit is contained in:
124
DoSign.py
124
DoSign.py
@@ -363,7 +363,7 @@ def food(phone, session):
|
|||||||
bd = js.call('main').split('=')
|
bd = js.call('main').split('=')
|
||||||
ck[bd[0]] = bd[1]
|
ck[bd[0]] = bd[1]
|
||||||
ll, jy = getParadiseInfo(phone, session)
|
ll, jy = getParadiseInfo(phone, session)
|
||||||
if jy < 14500:
|
if jy < 14700:
|
||||||
bd = js.call('main').split('=')
|
bd = js.call('main').split('=')
|
||||||
ck[bd[0]] = bd[1]
|
ck[bd[0]] = bd[1]
|
||||||
url = "https://wapside.189.cn:9001/jt-sign/paradise/food"
|
url = "https://wapside.189.cn:9001/jt-sign/paradise/food"
|
||||||
@@ -382,16 +382,28 @@ from tools.aes_encrypt import AES_Ctypt
|
|||||||
|
|
||||||
|
|
||||||
# 签到
|
# 签到
|
||||||
def chech_in(phone, session, ck):
|
def chech_in(phone, session):
|
||||||
url = "https://wapside.189.cn:9001/jt-sign/api/home/sign"
|
try:
|
||||||
time1 = int(round(time.time() * 1000))
|
bd = js.call('main').split('=')
|
||||||
data = {
|
ck[bd[0]] = bd[1]
|
||||||
"encode": AES_Ctypt("34d7cb0bcdf07523").encrypt(
|
url = "https://wapside.189.cn:9001/jt-sign/api/home/sign"
|
||||||
f'{{"phone":{phone},"date":{time1},"signSource":"smlprgrm"}}')
|
time1 = int(round(time.time() * 1000))
|
||||||
}
|
data = {
|
||||||
response = session.post(url, json=data, cookies=ck)
|
"encode": AES_Ctypt("34d7cb0bcdf07523").encrypt(
|
||||||
printn(f'=={phone[-4:]}==' + response.text)
|
f'{{"phone":{phone},"date":{time1},"signSource":"smlprgrm"}}')
|
||||||
# printn(type(response.text))
|
}
|
||||||
|
response = session.post(url, json=data, cookies=ck)
|
||||||
|
printn(f'=chech_in={phone[-4:]}==' + response.text)
|
||||||
|
resp = json.loads(response.text)
|
||||||
|
if resp["resoultCode"] == '0':
|
||||||
|
printn(f'=={phone[:3]}***{phone[-4:]}连续签到成功\n')
|
||||||
|
return f'=chech_in={phone[:3]}***{phone[-4:]}连续签到成功\n'
|
||||||
|
else:
|
||||||
|
printn('签到失败\n')
|
||||||
|
return 'chech_in签到失败\n'
|
||||||
|
except Exception as e:
|
||||||
|
print(e)
|
||||||
|
|
||||||
'''
|
'''
|
||||||
{"resoultCode":"0","data":{"next":{"signSource":"","signTime":"","iSeven":"","id":"","state":"","specialFlag":"","userId":"","flow":0,"coin":100},"msg":"签到成功","signSource":"smlprgrm","code":1,"continuousDay":1,"currentDate":1733131397963,"type":"firstSign","userId":"2022072000057809098","flow":0,"coin":120,"totalDay":1},"resoultMsg":"成功"}
|
{"resoultCode":"0","data":{"next":{"signSource":"","signTime":"","iSeven":"","id":"","state":"","specialFlag":"","userId":"","flow":0,"coin":100},"msg":"签到成功","signSource":"smlprgrm","code":1,"continuousDay":1,"currentDate":1733131397963,"type":"firstSign","userId":"2022072000057809098","flow":0,"coin":120,"totalDay":1},"resoultMsg":"成功"}
|
||||||
'''
|
'''
|
||||||
@@ -399,20 +411,37 @@ def chech_in(phone, session, ck):
|
|||||||
|
|
||||||
# {'resoultCode': 0, 'data': {'continuousDay': 1, 'signDay': 1, 'reStatus': 0, 'isSign': 1, 'isSeven': False}, 'resoultMsg': '请求成功'}
|
# {'resoultCode': 0, 'data': {'continuousDay': 1, 'signDay': 1, 'reStatus': 0, 'isSign': 1, 'isSeven': False}, 'resoultMsg': '请求成功'}
|
||||||
def userStatusInfo(phone, session):
|
def userStatusInfo(phone, session):
|
||||||
|
msgstr = ''
|
||||||
try:
|
try:
|
||||||
bd = js.call('main').split('=')
|
bd = js.call('main').split('=')
|
||||||
ck[bd[0]] = bd[1]
|
ck[bd[0]] = bd[1]
|
||||||
url = "https://wapside.189.cn:9001/jt-sign/api/home/userStatusInfo"
|
url = "https://wapside.189.cn:9001/jt-sign/api/home/userStatusInfo"
|
||||||
data = {"para": encrypt_para(f'{{"phone":{phone}}}')}
|
data = {"para": encrypt_para(f'{{"phone":{phone}}}')}
|
||||||
response = session.post(url, json=data, cookies=ck)
|
response = session.post(url, json=data, cookies=ck)
|
||||||
printn(f'=={phone[-4:]}==' + response.text)
|
printn(f'=userStatusInfo={phone[-4:]}==' + response.text)
|
||||||
resp = json.loads(response.text)
|
resp = json.loads(response.text)
|
||||||
if resp["resoultCode"] == 0:
|
if resp["resoultCode"] == 0 and resp["data"]["isSign"] != 1:
|
||||||
printn(
|
msgstr += chech_in(phone,session)
|
||||||
f'=={phone[:3]}***{phone[-4:]}连续签到{resp["data"]["continuousDay"]}天=当前签到{resp["data"]["signDay"]}天=\n')
|
msgstr += f'=userStatusInfo={phone[-4:]}==已签到{resp["data"]["continuousDay"]}天\n'
|
||||||
return f'=={phone[:3]}***{phone[-4:]}连续签到{resp["data"]["continuousDay"]}天=当前签到{resp["data"]["signDay"]}天='
|
elif resp["data"]["isSeven"]:
|
||||||
|
msgstr +=exchangePrize(phone, 7, session)
|
||||||
else:
|
else:
|
||||||
return '签到失败\n'
|
msgstr +=f'=userStatusInfo={phone[-4:]}==已签到{resp["data"]["continuousDay"]}天\n'
|
||||||
|
return msgstr
|
||||||
|
# if resp["resoultCode"] == 0:
|
||||||
|
# if resp["data"]["isSign"] == 0:
|
||||||
|
# chech_in(phone,session)
|
||||||
|
# # printn(str2)
|
||||||
|
# # return str2
|
||||||
|
# else:
|
||||||
|
# # return f'=={phone[-4:]}已签到'
|
||||||
|
# printn(f'=={phone[-4:]}已签到')
|
||||||
|
# if resp["data"]["isSeven"]:
|
||||||
|
# str1 = exchangePrize(phone,7,session)
|
||||||
|
# printn(str1)
|
||||||
|
# else:
|
||||||
|
# # return '查询失败\n'
|
||||||
|
# printn('查询失败\n')
|
||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(e)
|
print(e)
|
||||||
@@ -425,7 +454,7 @@ def continueSignDays(phone, session):
|
|||||||
url = "https://wapside.189.cn:9001/jt-sign/webSign/continueSignDays"
|
url = "https://wapside.189.cn:9001/jt-sign/webSign/continueSignDays"
|
||||||
data = {"para": encrypt_para(f'{{"phone":{phone}}}')}
|
data = {"para": encrypt_para(f'{{"phone":{phone}}}')}
|
||||||
response = session.post(url, json=data, cookies=ck)
|
response = session.post(url, json=data, cookies=ck)
|
||||||
printn(f'=={phone[-4:]}==' + response.text)
|
printn(f'=continueSignDays={phone[-4:]}==' + response.text)
|
||||||
resp = json.loads(response.text)
|
resp = json.loads(response.text)
|
||||||
# {'continueSignDays': 1, 'resoultCode': '0', 'level': 6}
|
# {'continueSignDays': 1, 'resoultCode': '0', 'level': 6}
|
||||||
if resp['resoultCode'] == '0':
|
if resp['resoultCode'] == '0':
|
||||||
@@ -433,20 +462,46 @@ def continueSignDays(phone, session):
|
|||||||
if resp["continueSignDays"] == 7:
|
if resp["continueSignDays"] == 7:
|
||||||
str1 = exchangePrize(phone, 7, session)
|
str1 = exchangePrize(phone, 7, session)
|
||||||
return str1
|
return str1
|
||||||
elif resp["continueSignDays"] == 15:
|
# elif resp["continueSignDays"] == 15:
|
||||||
str1 = exchangePrize(phone, 15, session)
|
# str1 = exchangePrize(phone, 15, session)
|
||||||
return str1
|
# return str1
|
||||||
elif resp["continueSignDays"] == 28:
|
# elif resp["continueSignDays"] == 28:
|
||||||
str1 = exchangePrize(phone, 28, session)
|
# str1 = exchangePrize(phone, 28, session)
|
||||||
return str1
|
# return str1
|
||||||
else:
|
else:
|
||||||
printn('查询抽奖天数失败')
|
printn(f'=continueSignDays={phone[-4:]}未到7天抽奖')
|
||||||
return '查询抽奖天数失败\n'
|
return f'=continueSignDays={phone[-4:]}未到7天抽奖\n'
|
||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(e)
|
print(e)
|
||||||
|
return e
|
||||||
|
|
||||||
|
|
||||||
|
# {"resoultCode":0,"continue15List":[],"continue28List":[],"resoultMsg":"查询成功"}
|
||||||
|
#{"resoultCode":0,"continue15List":[{"updateDate":{"date":15,"hours":8,"seconds":44,"month":0,"timezoneOffset":-480,"year":125,"minutes":1,"time":1736899304000,"day":3},"month":"202501","phone":"18552988878","id":6560172,"type":15,"createDate":{"date":15,"hours":8,"seconds":44,"month":0,"timezoneOffset":-480,"year":125,"minutes":1,"time":1736899304000,"day":3},"status":0}],"continue28List":[],"resoultMsg":"查询成功"}
|
||||||
|
def continueSignRecords(phone,session):
|
||||||
|
try:
|
||||||
|
bd = js.call('main').split('=')
|
||||||
|
ck[bd[0]] = bd[1]
|
||||||
|
url = "https://wapside.189.cn:9001/jt-sign/webSign/continueSignRecords"
|
||||||
|
data = {"para": encrypt_para(f'{{"phone":{phone}}}')}
|
||||||
|
response = session.post(url, json=data, cookies=ck)
|
||||||
|
printn(f'=continueSignRecords={phone[-4:]}==' + response.text)
|
||||||
|
resp = json.loads(response.text)
|
||||||
|
if resp["resoultCode"] == 0:
|
||||||
|
if len(resp["continue15List"]) > 0:
|
||||||
|
str1 = exchangePrize(phone,15,session)
|
||||||
|
return str1
|
||||||
|
elif len(resp["continue28List"]) > 0:
|
||||||
|
str2 = exchangePrize(phone,28,session)
|
||||||
|
return str2
|
||||||
|
else:
|
||||||
|
return f'=continueSignRecords={phone[-4:]}未到15/28抽奖天数\n'
|
||||||
|
|
||||||
|
except Exception as e:
|
||||||
|
print(e)
|
||||||
|
return e
|
||||||
|
|
||||||
# 抽奖
|
# 抽奖
|
||||||
def exchangePrize(phone, cd, session):
|
def exchangePrize(phone, cd, session):
|
||||||
try:
|
try:
|
||||||
@@ -457,17 +512,18 @@ def exchangePrize(phone, cd, session):
|
|||||||
str1 = session.post(url, json=data, cookies=ck).text
|
str1 = session.post(url, json=data, cookies=ck).text
|
||||||
resp = json.loads(str1)
|
resp = json.loads(str1)
|
||||||
printn(resp)
|
printn(resp)
|
||||||
if resp["resoultCode"] == 0:
|
result_code = resp.get('resoultCode')
|
||||||
|
if result_code == 0:
|
||||||
if resp["prizeDetail"]["code"] ==0:
|
if resp["prizeDetail"]["code"] ==0:
|
||||||
printn(f'连签{cd}天,奖品:{resp["prizeDetail"]["biz"]["title"]}\n')
|
printn(f'连签{cd}天,奖品:{resp["prizeDetail"]["biz"]["title"]}\n')
|
||||||
return f'连签{cd}天,奖品:{resp["prizeDetail"]["biz"]["title"]}\n'
|
return f'连签{cd}天,奖品:{resp["prizeDetail"]["biz"]["title"]}\n'
|
||||||
else:
|
else:
|
||||||
printn('连签内容好像有问题')
|
printn('连签内容好像有问题')
|
||||||
return '连签内容好像有问题\n'
|
return '连签已抽奖!\n'
|
||||||
|
|
||||||
else:
|
elif result_code is None:
|
||||||
printn('连签抽奖好像不对劲')
|
printn('连签抽奖好像不对劲')
|
||||||
return '连签抽奖好像不对劲\n'
|
return '连签已抽奖!\n'
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(e)
|
print(e)
|
||||||
|
|
||||||
@@ -509,13 +565,17 @@ def ks(phone, ticket, uid):
|
|||||||
"Referer": "https://wapside.189.cn:9001/resources/dist/signInActivity.html",
|
"Referer": "https://wapside.189.cn:9001/resources/dist/signInActivity.html",
|
||||||
"sign": sign}
|
"sign": sign}
|
||||||
s.headers.update(new_header)
|
s.headers.update(new_header)
|
||||||
chech_in(phone,s,ck)
|
# chech_in(phone,s,ck)
|
||||||
for i in range(10):
|
for i in range(10):
|
||||||
food(phone, s)
|
food(phone, s)
|
||||||
|
time.sleep(1)
|
||||||
msg +=userStatusInfo(phone,s)
|
msg +=userStatusInfo(phone,s)
|
||||||
|
msg +=continueSignRecords(phone,s)
|
||||||
ll,jy = getParadiseInfo(phone,s)
|
ll,jy = getParadiseInfo(phone,s)
|
||||||
msg +=f'云宝等级:{ll},经验值:{jy}\n'
|
msg +=f'{phone[-4:]}:云宝等级:{ll},经验值:{jy}\n'
|
||||||
msg +=continueSignDays(phone, s)
|
msg +=continueSignDays(phone, s)
|
||||||
|
msg +=userStatusInfo(phone,s)
|
||||||
|
msg +='===========分隔=============\n'
|
||||||
printn(msg)
|
printn(msg)
|
||||||
|
|
||||||
else:
|
else:
|
||||||
|
|||||||
Reference in New Issue
Block a user