(title, content)
| 150 | return |
| 151 | |
| 152 | def serverJ(title, content): |
| 153 | print("\n") |
| 154 | if not PUSH_KEY: |
| 155 | print("server酱服务的PUSH_KEY未设置!!\n取消推送") |
| 156 | return |
| 157 | print("serverJ服务启动") |
| 158 | data = { |
| 159 | "text": title, |
| 160 | "desp": content.replace("\n", "\n\n") |
| 161 | } |
| 162 | response = requests.post(f"https://sc.ftqq.com/{PUSH_KEY}.send", data=data).json() |
| 163 | if response['code'] == 0: |
| 164 | print('推送成功!') |
| 165 | else: |
| 166 | print('推送失败!') |
| 167 | |
| 168 | # tg通知 |
| 169 | def telegram_bot(title, content): |