@@ -53,7 +53,7 @@ class CheckCoinmarketcap:
context += '\n{}'.format(datetime.now().strftime("%Y-%m-%d %H:%M:%S"))
print(context)
# 推送到 message
- GotifyNotifier('实时coin价格', context).send_message()
+ GotifyNotifier('实时coin价格', context, 'AgfOJESqDKftBTQ').send_message()
else:
print('no data!')
@@ -51,10 +51,10 @@ try:
if int(fastest) > 30 or int(fast) > 30 or int(standard) > 30 or int(low) > 30 or int(base) > 30:
- GotifyNotifier('gas 费大于 30', result).send_message()
+ GotifyNotifier('gas 费大于 30', result, 'AgfOJESqDKftBTQ').send_message()
elif int(fastest) < 5 or int(fast) < 5 or int(standard) < 5 or int(low) < 5 or int(base) < 5:
- GotifyNotifier('gas 费小于 5', result).send_message()
+ GotifyNotifier('gas 费小于 5', result, 'AgfOJESqDKftBTQ').send_message()
except Exception as e:
@@ -65,7 +65,7 @@ class CheckVIX:
print(f'发送消息: {context}')
- GotifyNotifier('vix恐慌指数', context).send_message()
+ GotifyNotifier('vix恐慌指数', context, 'AgfOJESqDKftBTQ').send_message()
print(f"VIX恐慌指数小于{self.check_value},不发送消息\n{context}")
@@ -219,7 +219,7 @@ def main():
if text:
print(text)
- GotifyNotifier('Real-time coin price\n', text).send_message()
+ GotifyNotifier('Real-time coin price\n', text, 'AgfOJESqDKftBTQ').send_message()
print('No Data')
@@ -144,7 +144,7 @@ class CheckDlt:
title = f'大乐透 {subject} 期'
- GotifyNotifier(title, text).send_message()
+ GotifyNotifier(title, text, 'A3bqt9Dlbs.fPUb').send_message()
# 发送到邮件
SendEmail(title, title, text).send()
@@ -58,7 +58,7 @@ class Weather():
one_week_weather)
- GotifyNotifier('天气预报数', text).send_message()
+ GotifyNotifier('天气预报数', text, 'A9KF--mx_12PjSu').send_message()
self.logs_handle.logs_write('Weather forecast', '天气预报数据已获取', 'done', False)
@@ -48,7 +48,7 @@ class AutoRemind:
# 组装完标题和正文, 准备发送消息
- GotifyNotifier(title, context).send_message()
+ GotifyNotifier(title, context, 'AT2QGp_vyCX4akW').send_message()
# 推送到 serverchan
ServerChanNotifier(title, context.replace('\n', '\n\n')).send_message()
@@ -4,9 +4,9 @@ import httpx
class GotifyNotifier:
- def __init__(self, title, message):
+ def __init__(self, title, message, token='A9KF--mx_12PjSu'):
self.gotify_url = 'https://gotify.erhe.top'
- self.app_token = 'A9KF--mx_12PjSu'
+ self.app_token = token
self.title = title
self.message = message