You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
558 B
20 lines
558 B
# -*- coding: utf-8 -*-
|
|
import subprocess
|
|
|
|
token = 'AdVsmticWy_cnF6'
|
|
title = '测试标题'
|
|
message = '这是一条通过 Webhook 推送的消息'
|
|
priority = 5
|
|
|
|
# 推送消息
|
|
result = subprocess.run(['curl',
|
|
f'https://gotify.erhe.top/message?token={token}',
|
|
'-F',
|
|
f'title={title}',
|
|
'-F',
|
|
f'message={message}',
|
|
'-F',
|
|
f'priority={priority}'
|
|
])
|
|
|
|
print(result)
|
|
|