forked from smallfawn/decode_action
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
549c561
commit e20fb1d
Showing
2 changed files
with
2 additions
and
318 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,317 +1 @@ | ||
#2024-11-23 15:09:49 | ||
#!/usr/bin/python3 | ||
# -- coding: utf-8 -- | ||
if 82-82:Iii1i | ||
import requests | ||
import json | ||
import os | ||
import time | ||
import notify | ||
import random | ||
if 87-87:Ii%i1i1i1111I.Oo/OooOoo*I1Ii1I1-I1I | ||
if 81-81:i1+ooOOO/oOo0O00*i1iiIII111*IiIIii11Ii | ||
if 84-84:ooo000-Ooo0Ooo+iI1iII1I1I1i.IIiIIiIi11I1 | ||
def iI111iiIi11i(url): | ||
OoOoo0o=[] | ||
print("✨ 获取任务列表") | ||
if 11-11:i1I1-O000o/O0OO0OooooOo*ii%Ii*i1 | ||
if 9-9:i1iiIII111 | ||
i1Ii1i={"Content-Type":"application/x-www-form-urlencoded"} | ||
if 93-93:IIiIIiIi11I1%IIiIIiIi11I1/I1I-Oo.Ooo0Ooo | ||
OO0o000o=requests.get(url,headers=i1Ii1i) | ||
IIiiii1IiIiII=OO0o000o.text | ||
if 32-32:iI1iII1I1I1i | ||
if 71-71:Ii | ||
iiIII=IIiiii1IiIiII | ||
OoOoo0o=iiIII | ||
if 28-28:I1Ii1I1.Iii1i-ooOOO-iI1iII1I1I1i | ||
if 37-37:O000o*IIiIIiIi11I1*I1I/oOo0O00 | ||
return OoOoo0o | ||
if 28-28:O0OO0OooooOo | ||
if 95-95:i1iiIII111.Ii.IIiIIiIi11I1%i1I1%I1Ii1I1 | ||
def ii1i(url): | ||
OoOoo0o="" | ||
if 87-87:Oo-O0OO0OooooOo | ||
print("✨ 获取任务列表") | ||
iiI1111IIi1=oOo00O(url) | ||
if 59-59:Iii1i.ii-O0OO0OooooOo | ||
ii1IiIiiII="https://api.txttool.cn/netcut/note/info/" | ||
if 21-21:oOo0O00%i1I1%O000o.oOo0O00 | ||
if 85-85:OooOoo | ||
i1Ii1i={"Content-Type":"application/x-www-form-urlencoded"} | ||
o00={"note_id":iiI1111IIi1} | ||
if 20-20:ii+i1iiIII111/I1I | ||
OO0o000o=requests.post(ii1IiIiiII,data=o00,headers=i1Ii1i) | ||
IIiiii1IiIiII=OO0o000o.json() | ||
if 88-88:i1I1+ooOOO-i1i1i1111I.Ooo0Ooo*Ii+Iii1i | ||
oOo0O00O0ooo=IIiiii1IiIiII.get("status") | ||
if 89-89:Ii%IiIIii11Ii | ||
if oOo0O00O0ooo==1: | ||
if 75-75:Ooo0Ooo/Ii/IiIIii11Ii+IiIIii11Ii.I1I | ||
iiIII=IIiiii1IiIiII["data"]["note_content"] | ||
OoOoo0o=iiIII | ||
if 88-88:Oo*IiIIii11Ii | ||
return OoOoo0o | ||
if 100-100:ii-OooOoo*I1Ii1I1/Ooo0Ooo/Iii1i | ||
def oOo00O(url): | ||
iiI1111IIi1=url.split("/")[-1] | ||
return iiI1111IIi1 | ||
if 23-23:Ooo0Ooo+i1*I1Ii1I1+Oo*Ii-IIiIIiIi11I1 | ||
class iIIiii1iI(): | ||
name="mi" | ||
if 43-43:ooOOO.i1I1+ooo000 | ||
def __init__(self,cookie,pos,components): | ||
self.cookie=cookie | ||
self.posLabel=pos | ||
self.messageSuccess="" | ||
self.messageFail="" | ||
if 87-87:Iii1i+ooOOO.O0OO0OooooOo/Ii+Oo | ||
if 77-77:i1iiIII111+ii-Oo%ooo000 | ||
self.headers={"Cookie":cookie,"Content-Type":"application/json","x-user-agent":"channel/mishop platform/mishop.ios"} | ||
if 74-74:Ii+Ooo0Ooo | ||
if 1-1:I1I%Ooo0Ooo+i1iiIII111.i1iiIII111%Oo | ||
self.task=components | ||
if 93-93:oOo0O00%Ooo0Ooo*i1iiIII111 | ||
if 52-52:O000o+I1I/ooo000-I1Ii1I1*O0OO0OooooOo%oOo0O00 | ||
if 52-52:oOo0O00.I1I+O0OO0OooooOo-i1iiIII111%iI1iII1I1I1i | ||
if 57-57:I1I*IIiIIiIi11I1%I1Ii1I1*i1i1i1111I | ||
if 37-37:ii*i1i1i1111I+oOo0O00/I1I/OooOoo | ||
if 4-4:i1 | ||
if 61-61:iI1iII1I1I1i.O0OO0OooooOo-ooo000/ooo000-i1 | ||
if 19-19:Iii1i*Ooo0Ooo.I1Ii1I1/i1I1*Ii-O000o | ||
if 32-32:iI1iII1I1I1i | ||
if 18-18:i1I1*ii%iI1iII1I1I1i+ii | ||
if 93-93:O000o-I1Ii1I1-IIiIIiIi11I1*ooOOO-i1 | ||
if 82-82:IIiIIiIi11I1%i1*ooOOO | ||
if 57-57:oOo0O00 | ||
if 31-31:i1iiIII111+i1i1i1111I%OooOoo | ||
if 20-20:OooOoo-I1I | ||
if 9-9:i1iiIII111-iI1iII1I1I1i%Ii-I1I | ||
if 54-54:Iii1i%ooo000%Iii1i-IiIIii11Ii | ||
if 39-39:O000o-O000o*i1%IIiIIiIi11I1 | ||
if 29-29:IIiIIiIi11I1-ooo000.i1iiIII111 | ||
if 86-86:I1Ii1I1-OooOoo-O000o%ooo000.O0OO0OooooOo%Iii1i | ||
if 11-11:OooOoo-I1Ii1I1-ooOOO.i1iiIII111-iI1iII1I1I1i/i1iiIII111 | ||
if 44-44:Ooo0Ooo+i1i1i1111I+Iii1i-O000o | ||
def getToken(self,headers,taskId,actId,taskName): | ||
if 7-7:i1i1i1111I/Ii*Iii1i | ||
if 32-32:ii.OooOoo | ||
if 31-31:Oo-O0OO0OooooOo | ||
if 28-28:ooOOO*I1Ii1I1+ii%Oo | ||
if 100-100:Oo+O0OO0OooooOo | ||
print("♻️ "+"获取任务token:"+taskName) | ||
I1II1ii111i="https://shop-api.retail.mi.com/mtop/mf/act/infinite/do" | ||
o00=[{},{"taskId":taskId,"actId":actId}] | ||
IIiiii1IiIiII=requests.post(I1II1ii111i,headers=headers,json=o00) | ||
IIiiii1IiIiII=json.loads(IIiiii1IiIiII.text) | ||
if 14-14:ii+O0OO0OooooOo.IiIIii11Ii.Ooo0Ooo%IiIIii11Ii*i1i1i1111I | ||
if 65-65:Iii1i+IIiIIiIi11I1-Ooo0Ooo.iI1iII1I1I1i+OooOoo*Ooo0Ooo | ||
if 23-23:ooOOO%O000o%iI1iII1I1I1i-O0OO0OooooOo-i1iiIII111+i1 | ||
if 12-12:i1-O0OO0OooooOo-ii | ||
if 86-86:Iii1i+i1iiIII111-IIiIIiIi11I1/I1I | ||
return IIiiii1IiIiII | ||
if 46-46:ooOOO+ooOOO%O000o | ||
def doTask(self,headers,taskToken,actId,taskType,taskName): | ||
print("🍱 正在做任务:"+taskName) | ||
if 2-2:i1i1i1111I/Ooo0Ooo/O000o-IIiIIiIi11I1/IIiIIiIi11I1 | ||
if 58-58:i1i1i1111I | ||
if 38-38:i1-oOo0O00 | ||
if 85-85:IIiIIiIi11I1+i1I1%Ooo0Ooo+O000o*i1iiIII111 | ||
I1II1ii111i="https://shop-api.retail.mi.com/mtop/mf/act/infinite/done" | ||
o00=[{},{"taskToken":taskToken,"actId":actId,"taskType":taskType}] | ||
IIiiii1IiIiII=requests.post(I1II1ii111i,headers=headers,json=o00) | ||
if 46-46:ooOOO-ooOOO+Oo/I1I*Oo+O000o | ||
IIiiii1IiIiII=json.loads(IIiiii1IiIiII.text) | ||
i1II1=IIiiii1IiIiII['code'] | ||
if 76-76:oOo0O00%I1I.i1+I1Ii1I1+oOo0O00 | ||
if 2-2:OooOoo%Ii+O000o.OooOoo+IIiIIiIi11I1*Oo | ||
if 2-2:IIiIIiIi11I1+iI1iII1I1I1i-I1Ii1I1+ooOOO.IIiIIiIi11I1 | ||
if 15-15:ooo000 | ||
if 63-63:O0OO0OooooOo | ||
if 81-81:OooOoo.O0OO0OooooOo/i1i1i1111I+Oo/Ooo0Ooo%ii | ||
III1II11i="" | ||
if i1II1==0: | ||
iiI1iiii1iii=IIiiii1IiIiII["data"]["awardList"][0]["awardValue"] | ||
III1II11i="🎉 "+taskName+"获得"+iiI1iiii1iii+"米金\n" | ||
self.messageSuccess+=III1II11i | ||
elif i1II1==200001: | ||
O0OOooO0O0Oo0=IIiiii1IiIiII["msg"] | ||
III1II11i="📢 "+taskName+O0OOooO0O0Oo0+"\n" | ||
self.messageSuccess+=III1II11i | ||
else: | ||
III1II11i="❌ "+taskName+"失败\n" | ||
self.messageFail+=III1II11i | ||
print(III1II11i) | ||
if 30-30:O0OO0OooooOo*I1I*Ooo0Ooo | ||
if 15-15:OooOoo/OooOoo+Ii.oOo0O00/ii | ||
def main(self): | ||
OO0=self.posLabel+1 | ||
print("👨🚀 "+"开始执行用户:"+str(OO0)) | ||
if 39-39:ooOOO-O000o%iI1iII1I1I1i-ii.Ooo0Ooo.i1iiIII111 | ||
if 78-78:i1i1i1111I.O0OO0OooooOo/O0OO0OooooOo | ||
for IiiI11IIi1I in range(len(self.task)): | ||
if 82-82:IIiIIiIi11I1.Ooo0Ooo+i1iiIII111+Oo | ||
I1II1I1i=self.task[IiiI11IIi1I]["taskId"] | ||
oOOoO0o=self.task[IiiI11IIi1I]["actId"] | ||
OoOOooO0oOO0Oo=self.task[IiiI11IIi1I]["taskType"] | ||
iiI1i1IiiiIi1=self.task[IiiI11IIi1I]["taskName"] | ||
i1Ii1i=self.headers | ||
if 20-20:oOo0O00*ooOOO%IIiIIiIi11I1-IIiIIiIi11I1 | ||
try: | ||
IIiiii1IiIiII=self.getToken(i1Ii1i,I1II1I1i,oOOoO0o,iiI1i1IiiiIi1) | ||
if 32-32:OooOoo%I1I-i1I1%OooOoo | ||
i1II1=IIiiii1IiIiII["code"] | ||
if 9-9:i1iiIII111-ooOOO%Iii1i | ||
if i1II1==0: | ||
O00OoO0OOO0=IIiiii1IiIiII["data"]["taskToken"] | ||
self.doTask(i1Ii1i,O00OoO0OOO0,oOOoO0o,OoOOooO0oOO0Oo,iiI1i1IiiiIi1) | ||
elif i1II1==200006: | ||
print("📢 跳过此任务,可能已刷新最新任务。请抓取小米商城app的https://shop-api.retail.mi.com/mtop/navi/venue/batch包的响应体,将任务列表响应发送到issues中,参考issues模板发送。") | ||
else: | ||
O0OOooO0O0Oo0=IIiiii1IiIiII["msg"] | ||
III1II11i="❌ "+O0OOooO0O0Oo0+"\n" | ||
self.messageFail+=III1II11i | ||
print(III1II11i) | ||
break | ||
Oo0o0Oo=random.uniform(2,5) | ||
time.sleep(Oo0o0Oo) | ||
time.sleep(2) | ||
if 100-100:i1iiIII111.IIiIIiIi11I1*ooo000*ooo000 | ||
if 85-85:IIiIIiIi11I1/OooOoo.O0OO0OooooOo%Oo+Oo-i1I1 | ||
if 59-59:OooOoo | ||
if 53-53:i1i1i1111I/ooOOO-ii+ooo000*i1i1i1111I*i1iiIII111 | ||
if 87-87:i1iiIII111-IIiIIiIi11I1*Ii%i1i1i1111I%i1 | ||
except: | ||
if 81-81:i1+i1i1i1111I*Oo-Oo*I1Ii1I1-oOo0O00 | ||
if 4-4:i1iiIII111 | ||
print("📢 跳过此任务,可能已刷新最新任务。请抓取小米商城app的https://shop-api.retail.mi.com/mtop/navi/venue/batch 包的响应体,将任务列表响应发送到issues中,参考issues模板发送。") | ||
Oo0o0Oo=random.uniform(11,15) | ||
time.sleep(Oo0o0Oo) | ||
if 8-8:IiIIii11Ii+OooOoo-i1 | ||
if ooo0==1: | ||
o0ooO0OOO.append(self.messageFail) | ||
else: | ||
if self.messageFail!="": | ||
o0ooO0OOO.append(self.messageFail+" "+self.messageSuccess) | ||
else: | ||
o0ooO0OOO.append(self.messageSuccess) | ||
if 86-86:iI1iII1I1I1i | ||
if 37-37:I1Ii1I1%iI1iII1I1I1i.O0OO0OooooOo+Ooo0Ooo+ooOOO*iI1iII1I1I1i | ||
if 39-39:IIiIIiIi11I1-Oo | ||
if 31-31:IiIIii11Ii%oOo0O00%oOo0O00*Iii1i | ||
if 85-85:Iii1i+Ii%IIiIIiIi11I1%oOo0O00 | ||
if 100-100:IiIIii11Ii%i1 | ||
if 82-82:ooOOO%OooOoo | ||
if 81-81:Ii | ||
if 40-40:O0OO0OooooOo.OooOoo+oOo0O00.i1iiIII111 | ||
if 96-96:I1I/O000o/i1I1+i1I1 | ||
if 35-35:IIiIIiIi11I1+oOo0O00 | ||
if 96-96:iI1iII1I1I1i.OooOoo.i1 | ||
if 87-87:ooo000*IiIIii11Ii%ooo000.ooOOO.Oo%iI1iII1I1I1i | ||
if 48-48:ooOOO*ooo000%IiIIii11Ii*i1.Iii1i-ii | ||
if 72-72:i1%i1i1i1111I*iI1iII1I1I1i | ||
if 90-90:Ooo0Ooo*OooOoo.Ii | ||
if 5-5:Oo-i1.O000o | ||
if 18-18:IiIIii11Ii-O000o*O0OO0OooooOo-OooOoo | ||
if 54-54:IIiIIiIi11I1.Ooo0Ooo%Ii+IiIIii11Ii*iI1iII1I1I1i/iI1iII1I1I1i | ||
if 31-31:IiIIii11Ii.IiIIii11Ii%Ii | ||
if 51-51:Oo/i1i1i1111I-I1I | ||
if 83-83:Iii1i%i1iiIII111.OooOoo/I1I%O000o.I1I | ||
if 76-76:i1iiIII111/OooOoo | ||
if 77-77:ooOOO | ||
if 19-19:ooOOO%I1Ii1I1 | ||
if 15-15:OooOoo.IiIIii11Ii.O0OO0OooooOo/Iii1i+ooOOO/Ii | ||
if 17-17:i1I1-i1i1i1111I.iI1iII1I1I1i-i1I1+Oo%iI1iII1I1I1i | ||
if 65-65:Ii%i1I1 | ||
if 39-39:Iii1i*IIiIIiIi11I1.Ooo0Ooo-Oo | ||
if 63-63:i1i1i1111I-i1iiIII111.OooOoo%OooOoo.ii+O0OO0OooooOo | ||
if 71-71:ooo000+i1I1%iI1iII1I1I1i+ii%Oo-Oo | ||
if 84-84:I1I%iI1iII1I1I1i-Ooo0Ooo/iI1iII1I1I1i+Ooo0Ooo-Oo | ||
if 41-41:ooOOO+OooOoo+IIiIIiIi11I1*i1i1i1111I | ||
if 12-12:i1i1i1111I | ||
if 56-56:IiIIii11Ii | ||
if 17-17:O0OO0OooooOo.O000o%Oo+IiIIii11Ii-Ooo0Ooo | ||
if 93-93:oOo0O00 | ||
if 77-77:Oo+i1I1%I1I | ||
if 20-20:i1-IiIIii11Ii.IiIIii11Ii%ooOOO.i1%Ooo0Ooo | ||
if 72-72:O000o%ii.ooOOO*I1Ii1I1.ooOOO | ||
if 90-90:IiIIii11Ii+I1Ii1I1.OooOoo | ||
if 73-73:i1i1i1111I-Iii1i/i1I1.ooo000/iI1iII1I1I1i-i1iiIII111 | ||
if 21-21:i1iiIII111+ii%i1i1i1111I | ||
if 7-7:ii/Ii | ||
if 87-87:ooOOO | ||
if 57-57:IIiIIiIi11I1-iI1iII1I1I1i%ooOOO-i1I1/IiIIii11Ii.Ooo0Ooo | ||
if 15-15:O0OO0OooooOo*i1I1-oOo0O00 | ||
if 6-6:ii-Ii | ||
if 1-1:I1I+OooOoo | ||
if 98-98:i1iiIII111+Iii1i.IIiIIiIi11I1 | ||
if 96-96:OooOoo/O000o-i1*i1I1 | ||
if 72-72:i1i1i1111I+Ii-Iii1i-i1i1i1111I-O0OO0OooooOo+Ooo0Ooo | ||
if 74-74:Ooo0Ooo*Oo+Iii1i-i1iiIII111 | ||
if 22-22:IiIIii11Ii-Ooo0Ooo.i1.O0OO0OooooOo-ooo000 | ||
if 68-68:ooo000 | ||
if 40-40:i1+I1Ii1I1+i1I1.Oo*i1I1%I1I | ||
if 100-100:OooOoo+Oo/OooOoo | ||
if 33-33:ii/OooOoo | ||
def iII11I11111I(): | ||
ooOO0OO0o="" | ||
for oOOooO in range(len(o0ooO0OOO)): | ||
if o0ooO0OOO[oOOooO]!="": | ||
ooOO0OO0o+="\n"+oo000OO000oO[oOOooO]+o0ooO0OOO[oOOooO]+"" | ||
if ooOO0OO0o!="": | ||
print("✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨") | ||
print(ooOO0OO0o+" ") | ||
print("✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨") | ||
return ooOO0OO0o | ||
if 74-74:i1iiIII111/IIiIIiIi11I1%OooOoo%iI1iII1I1I1i.i1iiIII111.i1i1i1111I | ||
def i1II1IIIII11(): | ||
IIi="艾默库 : https://github.com/imoki/sign_script" | ||
print("✨ "+IIi) | ||
print("🧾 使用教程请查看仓库notion链接") | ||
print("🤝 欢迎各种形式的贡献") | ||
if 72-72:oOo0O00-ii+i1iiIII111/O0OO0OooooOo.OooOoo*IiIIii11Ii | ||
if __name__=="__main__": | ||
if 40-40:ooo000*ii/i1i1i1111I*O000o+i1iiIII111-OooOoo | ||
IIiIIiiIIi="【小米商城】" | ||
ooOO0OO0o="" | ||
o0ooO0OOO=[] | ||
ooo0=0 | ||
oo000OO000oO=[] | ||
if 29-29:i1i1i1111I/oOo0O00 | ||
if 13-13:i1I1%i1iiIII111.OooOoo%ooo000%OooOoo | ||
i1II1IIIII11() | ||
try: | ||
ooo0=os.getenv("messageOnlyError") | ||
except: | ||
ooo0=1 | ||
print("🍳 需要发送所有消息") | ||
if 21-21:ii*I1Ii1I1 | ||
oO00oO0O=os.getenv("mi").split('@') | ||
if 97-97:i1-i1%IIiIIiIi11I1+IiIIii11Ii/O0OO0OooooOo*iI1iII1I1I1i | ||
if 60-60:i1I1-Ooo0Ooo%I1Ii1I1 | ||
if 26-26:ooOOO/IIiIIiIi11I1.O000o+i1I1.Oo | ||
if 37-37:I1Ii1I1 | ||
if 35-35:OooOoo%i1i1i1111I-iI1iII1I1I1i/IiIIii11Ii | ||
II="https://netcut.cn/p/92748844405ef7f1" | ||
OoOoo0o=ii1i(II) | ||
ooOooOo0=json.loads(OoOoo0o) | ||
ooOO=ooOooOo0["data"]["result_list"][1]["components"] | ||
if 90-90:IIiIIiIi11I1*iI1iII1I1I1i | ||
time.sleep(2) | ||
if 79-79:i1i1i1111I | ||
Ii111="" | ||
for oOOooO in range(len(oO00oO0O)): | ||
oo000OO000oO.append("👨🚀 "+"用户"+str(oOOooO+1)+" ") | ||
ooOooo=oO00oO0O[oOOooO] | ||
iIIiii1iI(ooOooo,oOOooO,ooOO).main() | ||
if 54-54:iI1iII1I1I1i%Oo.ii-Iii1i%i1I1*O0OO0OooooOo | ||
if 31-31:oOo0O00/Iii1i-IiIIii11Ii%O0OO0OooooOo/I1Ii1I1-i1i1i1111I | ||
ooOO0OO0o=iII11I11111I() | ||
if 68-68:i1I1.i1I1%i1I1 | ||
if ooOO0OO0o!="": | ||
notify.send(IIiIIiiIIi,ooOO0OO0o) | ||
else: | ||
print("🍳 消息为空不推送") | ||
if 71-71:ooo000 | ||
if 61-61:ooo000 | ||
if 48-48:Iii1i*i1i1i1111I+IiIIii11Ii | ||
#2024-11-29 03:33:22 |