mirror of
https://github.com/linbailo/zyqinglong.git
synced 2026-01-15 04:40:42 +08:00
修正推送失效
This commit is contained in:
parent
edec5018c3
commit
f93abaceea
24
SFSY.py
24
SFSY.py
@ -1639,13 +1639,22 @@ class RUN:
|
|||||||
# self.DRAGONBOAT_2024_Game_init()
|
# self.DRAGONBOAT_2024_Game_init()
|
||||||
self.DRAGONBOAT_2024_coinStatus(True)
|
self.DRAGONBOAT_2024_coinStatus(True)
|
||||||
|
|
||||||
self.sendMsg()
|
# self.sendMsg()
|
||||||
|
self.send_notification_message('顺丰速运')
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def sendMsg(self, help=False):
|
# def sendMsg(self, help=False):
|
||||||
if self.send_UID:
|
# if self.send_UID:
|
||||||
push_res = CHERWIN_TOOLS.wxpusher(self.send_UID, one_msg, APP_NAME, help)
|
# push_res = CHERWIN_TOOLS.wxpusher(self.send_UID, one_msg, APP_NAME, help)
|
||||||
print(push_res)
|
# print(push_res)
|
||||||
|
def send_notification_message(self,title):
|
||||||
|
try:
|
||||||
|
from notify import send
|
||||||
|
|
||||||
|
send(title, ''.join(send_msg))
|
||||||
|
except Exception as e:
|
||||||
|
if e:
|
||||||
|
print(f'发送通知消息失败!{e}')
|
||||||
|
|
||||||
|
|
||||||
def get_quarter_end_date():
|
def get_quarter_end_date():
|
||||||
@ -1716,7 +1725,7 @@ if __name__ == '__main__':
|
|||||||
点击“积分”,以下几种url之一:
|
点击“积分”,以下几种url之一:
|
||||||
https://mcs-mimp-web.sf-express.com/mcs-mimp/share/weChat/shareGiftReceiveRedirect
|
https://mcs-mimp-web.sf-express.com/mcs-mimp/share/weChat/shareGiftReceiveRedirect
|
||||||
https://mcs-mimp-web.sf-express.com/mcs-mimp/share/app/shareRedirect
|
https://mcs-mimp-web.sf-express.com/mcs-mimp/share/app/shareRedirect
|
||||||
多账号#、@、换行分割
|
多账号#、@、换行分割
|
||||||
✨ 设置青龙变量:
|
✨ 设置青龙变量:
|
||||||
export {ENV_NAME}='url'多账号#分割
|
export {ENV_NAME}='url'多账号#分割
|
||||||
|
|
||||||
@ -1734,11 +1743,10 @@ export {ENV_NAME}='url'多账号#分割
|
|||||||
print(f'无{ENV_NAME}变量')
|
print(f'无{ENV_NAME}变量')
|
||||||
#exit()
|
#exit()
|
||||||
local_version = '2024.06.02'
|
local_version = '2024.06.02'
|
||||||
|
|
||||||
# print(tokens)
|
# print(tokens)
|
||||||
if len(tokens) > 0:
|
if len(tokens) > 0:
|
||||||
print(f"\n>>>>>>>>>>共获取到{len(tokens)}个账号<<<<<<<<<<")
|
print(f"\n>>>>>>>>>>共获取到{len(tokens)}个账号<<<<<<<<<<")
|
||||||
for index, infos in enumerate(tokens):
|
for index, infos in enumerate(tokens):
|
||||||
run_result = RUN(infos, index).main()
|
run_result = RUN(infos, index).main()
|
||||||
if not run_result: continue
|
if not run_result: continue
|
||||||
|
|
||||||
|
|||||||
28
mtV1.py
28
mtV1.py
@ -28,9 +28,19 @@ else:
|
|||||||
meituanCookie = ['']
|
meituanCookie = ['']
|
||||||
print('无meituanCookie变量')
|
print('无meituanCookie变量')
|
||||||
|
|
||||||
|
|
||||||
|
def send_notification_message(title):
|
||||||
|
try:
|
||||||
|
from sendNotify import send
|
||||||
|
|
||||||
|
send(title, ''.join(all_print_list))
|
||||||
|
except Exception as e:
|
||||||
|
if e:
|
||||||
|
print('发送通知消息失败!')
|
||||||
|
|
||||||
#外卖
|
#外卖
|
||||||
def waim(ck):
|
def waim(ck):
|
||||||
|
|
||||||
cookie = f"token={ck};"
|
cookie = f"token={ck};"
|
||||||
headers = {"Cookie": cookie,
|
headers = {"Cookie": cookie,
|
||||||
"X-Requested-With":"com.tencent.mm",
|
"X-Requested-With":"com.tencent.mm",
|
||||||
@ -45,11 +55,11 @@ def waim(ck):
|
|||||||
print(f"获得{len(b['data']['allCoupons'])}张优惠券")
|
print(f"获得{len(b['data']['allCoupons'])}张优惠券")
|
||||||
for sj in b['data']['allCoupons']:
|
for sj in b['data']['allCoupons']:
|
||||||
print(f"{sj['couponName']}-{sj['amountLimit']}-{sj['couponAmount']}元-{sj['amountLimit']}-{sj['etime']}")
|
print(f"{sj['couponName']}-{sj['amountLimit']}-{sj['couponAmount']}元-{sj['amountLimit']}-{sj['etime']}")
|
||||||
|
|
||||||
|
|
||||||
#团购
|
#团购
|
||||||
def tuangou(ck):
|
def tuangou(ck):
|
||||||
|
|
||||||
cookie = f"token={ck};"
|
cookie = f"token={ck};"
|
||||||
headers = {"Cookie": cookie,
|
headers = {"Cookie": cookie,
|
||||||
"X-Requested-With":"com.tencent.mm",
|
"X-Requested-With":"com.tencent.mm",
|
||||||
@ -64,7 +74,7 @@ def tuangou(ck):
|
|||||||
print(f"获得{len(b['data']['allCoupons'])}张优惠券")
|
print(f"获得{len(b['data']['allCoupons'])}张优惠券")
|
||||||
for sj in b['data']['allCoupons']:
|
for sj in b['data']['allCoupons']:
|
||||||
print(f"{sj['couponName']}-{sj['amountLimit']}-{sj['couponAmount']}元-{sj['amountLimit']}-{sj['etime']}")
|
print(f"{sj['couponName']}-{sj['amountLimit']}-{sj['couponAmount']}元-{sj['amountLimit']}-{sj['etime']}")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
@ -86,7 +96,7 @@ def main():
|
|||||||
print('-------------')
|
print('-------------')
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print('错误')
|
print('错误')
|
||||||
|
|
||||||
print('----------------------')
|
print('----------------------')
|
||||||
z = z + 1
|
z = z + 1
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
@ -97,7 +107,7 @@ if __name__ == '__main__':
|
|||||||
main()
|
main()
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print('未知错误')
|
print('未知错误')
|
||||||
# try:
|
try:
|
||||||
# send_notification_message(title='') # 发送通知
|
send_notification_message(title='') # 发送通知
|
||||||
# except Exception as e:
|
except Exception as e:
|
||||||
# print('小错误')
|
print('小错误')
|
||||||
|
|||||||
@ -69,11 +69,11 @@ if "PUSH_PLUS_TOKEN" in os.environ:
|
|||||||
if "QYWX_AM" in os.environ:
|
if "QYWX_AM" in os.environ:
|
||||||
if len(os.environ["QYWX_AM"]) > 1:
|
if len(os.environ["QYWX_AM"]) > 1:
|
||||||
QYWX_AM = os.environ["QYWX_AM"]
|
QYWX_AM = os.environ["QYWX_AM"]
|
||||||
|
|
||||||
|
|
||||||
if "QYWX_KEY" in os.environ:
|
if "QYWX_KEY" in os.environ:
|
||||||
if len(os.environ["QYWX_KEY"]) > 1:
|
if len(os.environ["QYWX_KEY"]) > 1:
|
||||||
QYWX_KEY = os.environ["QYWX_KEY"]
|
QYWX_KEY = os.environ["QYWX_KEY"]
|
||||||
# print("已获取并使用Env环境 QYWX_AM")
|
# print("已获取并使用Env环境 QYWX_AM")
|
||||||
|
|
||||||
#接入飞书webhook推送
|
#接入飞书webhook推送
|
||||||
@ -159,7 +159,8 @@ def serverJ(title, content):
|
|||||||
"text": title,
|
"text": title,
|
||||||
"desp": content.replace("\n", "\n\n")
|
"desp": content.replace("\n", "\n\n")
|
||||||
}
|
}
|
||||||
response = requests.post(f"https://sc.ftqq.com/{PUSH_KEY}.send", data=data).json()
|
response = requests.post(
|
||||||
|
f"https://sct.ftqq.com/{PUSH_KEY}.send", data=data).json()
|
||||||
if response['code'] == 0:
|
if response['code'] == 0:
|
||||||
print('推送成功!')
|
print('推送成功!')
|
||||||
else:
|
else:
|
||||||
@ -267,13 +268,13 @@ def wecom_key(title, content):
|
|||||||
print("QYWX_KEY服务启动")
|
print("QYWX_KEY服务启动")
|
||||||
print("content"+content)
|
print("content"+content)
|
||||||
headers = {'Content-Type': 'application/json'}
|
headers = {'Content-Type': 'application/json'}
|
||||||
data = {
|
data = {
|
||||||
"msgtype":"text",
|
"msgtype":"text",
|
||||||
"text":{
|
"text":{
|
||||||
"content":title+"\n"+content.replace("\n", "\n\n")
|
"content":title+"\n"+content.replace("\n", "\n\n")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
print(f"https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key={QYWX_KEY}")
|
print(f"https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key={QYWX_KEY}")
|
||||||
response = requests.post(f"https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key={QYWX_KEY}", json=data,headers=headers).json()
|
response = requests.post(f"https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key={QYWX_KEY}", json=data,headers=headers).json()
|
||||||
print(response)
|
print(response)
|
||||||
@ -287,13 +288,13 @@ def fs_key(title, content):
|
|||||||
print("FS_KEY服务启动")
|
print("FS_KEY服务启动")
|
||||||
print("content"+content)
|
print("content"+content)
|
||||||
headers = {'Content-Type': 'application/json'}
|
headers = {'Content-Type': 'application/json'}
|
||||||
data = {
|
data = {
|
||||||
"msg_type":"text",
|
"msg_type":"text",
|
||||||
"content":{
|
"content":{
|
||||||
"text":title+"\n"+content.replace("\n", "\n\n")
|
"text":title+"\n"+content.replace("\n", "\n\n")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
print(f"https://open.feishu.cn/open-apis/bot/v2/hook/{FS_KEY}")
|
print(f"https://open.feishu.cn/open-apis/bot/v2/hook/{FS_KEY}")
|
||||||
response = requests.post(f"https://open.feishu.cn/open-apis/bot/v2/hook/{FS_KEY}", json=data,headers=headers).json()
|
response = requests.post(f"https://open.feishu.cn/open-apis/bot/v2/hook/{FS_KEY}", json=data,headers=headers).json()
|
||||||
print(response)
|
print(response)
|
||||||
@ -439,9 +440,9 @@ def send(title, content):
|
|||||||
continue
|
continue
|
||||||
elif i == 'wecom_key':
|
elif i == 'wecom_key':
|
||||||
if QYWX_KEY:
|
if QYWX_KEY:
|
||||||
|
|
||||||
for i in range(int(len(content)/2000)+1):
|
for i in range(int(len(content)/2000)+1):
|
||||||
wecom_key(title=title, content=content[i*2000:(i+1)*2000])
|
wecom_key(title=title, content=content[i*2000:(i+1)*2000])
|
||||||
else:
|
else:
|
||||||
print('未启用企业微信应用消息推送')
|
print('未启用企业微信应用消息推送')
|
||||||
continue
|
continue
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user