mirror of
https://github.com/CHERWING/CHERWIN_SCRIPTS.git
synced 2024-11-22 09:04:11 +08:00
Merge 4ce619ecd8 into 06468e0e46
This commit is contained in:
commit
9774ab3919
@ -336,9 +336,9 @@ def RESTART_SCRIPT(RESTART_SCRIPT_NAME):
|
||||
def CHECK():
|
||||
global CHERWIN_SCRIPT_CONFIG
|
||||
print('>>>>>>>开始获取版本信息...')
|
||||
baseurl = 'https://gitee.com/cherwin/CHERWIN_SCRIPTS/raw/main/'
|
||||
baseurl = 'https://github.moeyy.xyz/https://raw.githubusercontent.com/OpenTritium/CHERWIN_SCRIPTS/refs/heads/main/'
|
||||
TOOLS_NAME = 'CHERWIN_TOOLS.py'
|
||||
server_script_url = f'https://gitee.com/cherwin/CHERWIN_SCRIPTS/raw/main/{TOOLS_NAME}'
|
||||
server_script_url = f'https://github.moeyy.xyz/https://raw.githubusercontent.com/OpenTritium/CHERWIN_SCRIPTS/refs/heads/main/{TOOLS_NAME}'
|
||||
try:
|
||||
response = requests.get(f'{baseurl}CHERWIN_SCRIPT_CONFIG.json', verify=False)
|
||||
response.encoding = 'utf-8'
|
||||
@ -497,7 +497,7 @@ def get_ip():
|
||||
|
||||
def main(APP_NAME, local_script_name, ENV_NAME, local_version, need_invite=False):
|
||||
global APP_INFO, TIPS, TIPS_HTML
|
||||
git_url = f'https://gitee.com/cherwin/CHERWIN_SCRIPTS/raw/main/{local_script_name}'
|
||||
git_url = f'https://github.moeyy.xyz/https://raw.githubusercontent.com/OpenTritium/CHERWIN_SCRIPTS/refs/heads/main/{local_script_name}'
|
||||
if CHECK():
|
||||
APP_INFO = CHERWIN_SCRIPT_CONFIG.get("APP_CONFIG", {}).get(ENV_NAME, {})
|
||||
# print(APP_INFO)
|
||||
|
||||
56
EMS.py
56
EMS.py
@ -51,16 +51,18 @@ class RUN:
|
||||
self.s.verify = False
|
||||
self.openId = token
|
||||
self.headers = {
|
||||
'Host': 'ump.ems.com.cn',
|
||||
'Upgrade-Insecure-Requests': '1',
|
||||
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.102 Safari/537.36 MicroMessenger/7.0.20.1781(0x6700143B) NetType/WIFI MiniProgramEnv/Windows WindowsWechat/WMPF XWEB/6945',
|
||||
'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9',
|
||||
'Sec-Fetch-Site': 'none',
|
||||
'Sec-Fetch-Mode': 'navigate',
|
||||
'Sec-Fetch-User': '?1',
|
||||
'Sec-Fetch-Dest': 'document',
|
||||
'Accept-Language': 'zh-CN,zh',
|
||||
}
|
||||
"Host": "ump.ems.com.cn",
|
||||
"Connection": "keep-alive",
|
||||
"Accept": "application/json, text/plain, */*",
|
||||
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36 MicroMessenger/7.0.20.1781(0x6700143B) NetType/WIFI MiniProgramEnv/Windows WindowsWechat/WMPF WindowsWechat(0x63090a13) UnifiedPCWindowsWechat(0xf2540020) XWEB/11503",
|
||||
"Content-Type": "application/json",
|
||||
"Origin": "https://ump.ems.com.cn",
|
||||
"Sec-Fetch-Site": "same-origin",
|
||||
"Sec-Fetch-Mode": "cors",
|
||||
"Sec-Fetch-Dest": "empty",
|
||||
"Accept-Encoding": "gzip, deflate, br",
|
||||
"Accept-Language": "zh-CN,zh;q=0.9",
|
||||
}
|
||||
|
||||
|
||||
def do_request(self, url, method="POST",params=None, data=None, headers=None):
|
||||
@ -124,12 +126,12 @@ class RUN:
|
||||
Log(f"\n====== {act_name} ======")
|
||||
try:
|
||||
params = {
|
||||
"appId":"wx52872495fb375c4b",
|
||||
"userId":self.memberId,
|
||||
"openId":self.openId,
|
||||
"activId":'c0c4a0a3ef8145f49f2e294741a3cd62'
|
||||
"activId":'16f36f81f38f456a800ecafc85924700',
|
||||
"appId": "wx52872495fb375c4b",
|
||||
"openId": self.openId,
|
||||
"userId": self.memberId
|
||||
}
|
||||
response = self.do_request('https://ump.ems.com.cn/activCenterApi/signActivInfo/sign',data=params)
|
||||
response = self.do_request('https://ump.ems.com.cn/activCenterApi/eac/api/sign/joinSign',data=params)
|
||||
if response and response.get('code') == '000000':
|
||||
# print(response)
|
||||
info = response.get('info', {})
|
||||
@ -170,7 +172,7 @@ class RUN:
|
||||
Log(f"\n====== {act_name} ======")
|
||||
try:
|
||||
params = {
|
||||
"activId": "c0c4a0a3ef8145f49f2e294741a3cd62",
|
||||
"activId": "16f36f81f38f456a800ecafc85924700",
|
||||
"appId": "wx52872495fb375c4b",
|
||||
"openId": self.openId,
|
||||
"userId": self.memberId,
|
||||
@ -192,7 +194,7 @@ class RUN:
|
||||
Log(f"\n====== {act_name} ======")
|
||||
try:
|
||||
params = {
|
||||
"activId": "c0c4a0a3ef8145f49f2e294741a3cd62",
|
||||
"activId": "16f36f81f38f456a800ecafc85924700",
|
||||
"appId": "wx52872495fb375c4b",
|
||||
"openId": self.openId,
|
||||
"userId": self.memberId
|
||||
@ -225,25 +227,20 @@ class RUN:
|
||||
Log(f"\n====== {act_name} ======")
|
||||
try:
|
||||
params = {
|
||||
"activId": '16f36f81f38f456a800ecafc85924700',
|
||||
"appId": "wx52872495fb375c4b",
|
||||
"userId": self.memberId,
|
||||
"openId": self.openId,
|
||||
"activId": 'c0c4a0a3ef8145f49f2e294741a3cd62'
|
||||
"userId": self.memberId
|
||||
}
|
||||
response = self.do_request('https://ump.ems.com.cn/activCenterApi/signActivInfo/querySignDetail',data=params)
|
||||
|
||||
response = self.do_request('https://ump.ems.com.cn/activCenterApi/eac/api/sign/querySignActivInfo',data=params)
|
||||
if response and response.get('code') == '000000':
|
||||
Log(f'{act_name}成功✅')
|
||||
info = response.get('info', {})
|
||||
signDay = info.get('signDay', '')
|
||||
maxContiSignDay = info.get('maxContiSignDay', '')
|
||||
signDayList = info.get('signDayList', {})
|
||||
signDay = info.get('isContinueSign', '')
|
||||
coins = info.get('dailySignInCoins','')
|
||||
Log(f'>累计签到:【{signDay}】天')
|
||||
Log(f'>已连续签到:【{maxContiSignDay}】天')
|
||||
if date.today().strftime("%Y-%m-%d") not in signDayList:
|
||||
Log(f'>今日未签到')
|
||||
self.sign()
|
||||
else:
|
||||
Log(f'>今日已签到✅')
|
||||
Log(f'>:金币: {coins}')
|
||||
|
||||
return True
|
||||
else:
|
||||
@ -259,6 +256,7 @@ class RUN:
|
||||
|
||||
if self.findByOpenIdAppId():
|
||||
self.details()
|
||||
self.sign()
|
||||
self.querySignDetail()
|
||||
self.queryPrizeIsReceive()
|
||||
self.memberGoldsInfo()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user