增加备用push站点
This commit is contained in:
parent
e1351d6231
commit
ca955ed9ed
18
server.py
18
server.py
@ -56,11 +56,27 @@ _{datetime.datetime.now()}_
|
||||
pushisbusy=1
|
||||
def send():
|
||||
c= " \n".join(msgcache[:3])
|
||||
requests.post("http://push.nmhd.eu.org:12722/push/murmur", json={
|
||||
res = requests.post("http://push.nmhd.eu.org:12722/push/murmur", json={
|
||||
"title": title,
|
||||
"description": description,
|
||||
"content": c,
|
||||
"token": "tt"})
|
||||
# print(res)
|
||||
try:
|
||||
res = res.json()["success"]
|
||||
except:
|
||||
s="https://msgpusher.com/push/test111"
|
||||
# s="http://47.108.213.155:11722/push/murmur"
|
||||
res = requests.post(s, json={
|
||||
"title": title,
|
||||
"description": description,
|
||||
"content": c,
|
||||
"token": "tt"})
|
||||
# else:
|
||||
# if res["success"]:
|
||||
# return None
|
||||
# else:
|
||||
# return res["message"]
|
||||
|
||||
if len(msgcache) >3:
|
||||
send()
|
||||
|
Loading…
Reference in New Issue
Block a user