diff --git a/server.py b/server.py index 1d75d30..96b22fa 100755 --- a/server.py +++ b/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()