(title, content)
| 87 | |
| 88 | # BARK推送 |
| 89 | def bark(title, content): |
| 90 | print("\n") |
| 91 | if not BARK: |
| 92 | print("bark服务的bark_token未设置!!\n取消推送") |
| 93 | return |
| 94 | print("bark服务启动") |
| 95 | try: |
| 96 | response = requests.get( |
| 97 | f"""https://api.day.app/{BARK}/{title}/{urllib.parse.quote_plus(content)}""").json() |
| 98 | if response['code'] == 200: |
| 99 | print('推送成功!') |
| 100 | else: |
| 101 | print('推送失败!') |
| 102 | except: |
| 103 | print('推送失败!') |
| 104 | |
| 105 | # server酱 |
| 106 | def serverJ(title, content): |