From e0a75bbad97db649b7bec06425d26d2872867bc1 Mon Sep 17 00:00:00 2001 From: zjk2017 <2548836866@qq.com> Date: Thu, 18 Jul 2024 20:17:40 +0800 Subject: [PATCH] =?UTF-8?q?Delete=20=E4=B8=9C=E5=91=88.py?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 东呈.py | 56 -------------------------------------------------------- 1 file changed, 56 deletions(-) delete mode 100644 东呈.py diff --git a/东呈.py b/东呈.py deleted file mode 100644 index 35255a5..0000000 --- a/东呈.py +++ /dev/null @@ -1,56 +0,0 @@ -""" -cron: 30 7 * * * 东呈.py -new Env("东呈酒店") - -ArcadiaScriptPublic 频道:https://t.me/ArcadiaScript 群组:https://t.me/ArcadiaScriptPublic -三个变量 dcjd_token dcjd_DOSSENSESSIONID dcjd_blackbox - -原作者darkbfly的不好用 -""" -import json -import ApiRequest -import os -from notify import send - -title = '微信小程序-东呈酒店' -tokenName = 'ArcadiaScriptPublic_dcjd_token' -tokenName2 = 'ArcadiaScriptPublic_dcjd_DOSSENSESSIONID' -tokenName3 = 'ArcadiaScriptPublic_dcjd_blackbox' - - -class dcjd(ApiRequest.ApiRequest): - def __init__(self, data): - super().__init__() - self.sec.headers = { - 'Host': 'campaignapi.dossen.com', - 'Connection': 'keep-alive', - 'Dossen-Platform': 'WxMiniApp', - 'DOSSENSESSIONID': os.environ.get(tokenName2), - 'access_token': data, - 'User-Agent': 'Mozilla/5.0 (iPhone; CPU iPhone OS 17_3_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 MicroMessenger/8.0.48(0x18003030) NetType/WIFI Language/zh_CN', - 'Content-Type': 'application/json', - 'Referer': 'https://servicewechat.com/wxa4b8c0bda7f71cfc/281/page-frame.html', - 'Accept-Language': 'zh-CN,zh', - } - - def login(self): - params = { - 'blackbox': os.environ.get(tokenName3) - } - response = self.sec.get('https://campaignapi.dossen.com/selling/checkin/do', params=params, verify=False) - - if response.status_code == 200: - rj = response.json() - if rj['code'] == 0 or rj['code']==121300002: - msg = f"签到成功\n获得{rj['results']}积分!" - else: - msg = f"签到失败\n" + json.dumps(rj, ensure_ascii=False) - else: - msg = f"签到失败\n" + json.dumps(response.json(), ensure_ascii=False) - - print(msg) - send(title, msg) - - -if __name__ == '__main__': - ApiRequest.ApiMain(['login']).run(tokenName, dcjd)