diff --git a/run_tt_server.sh b/run_tt_server.sh index 2882902..64f5665 100755 --- a/run_tt_server.sh +++ b/run_tt_server.sh @@ -16,7 +16,7 @@ echo "Now run new service." cur_dateTime=$(date +%Y-%m-%d_%H-%M) #cur_dateTime=$(date +%Y-%m-%d_%H-%m-%s) echo ${cur_dateTime} -cd /root/tt/tt-tcp +cd ~/tt/tt-tcp #mv log.txt "./log-"${cur_dateTime}".txt" f="./log-"${cur_dateTime}".txt" mv rxlog.txt "./rxlog-"${cur_dateTime}".txt" diff --git a/server.py b/server.py index 8c1df3c..d71faaa 100755 --- a/server.py +++ b/server.py @@ -41,7 +41,6 @@ def s2wx(title="",description="", content=""): # return # 受API限制,频繁发送会失败 # 拟合并发送,满3条已发送,超时时间10s - if len(content): t=f""" *时戳:* @@ -65,7 +64,7 @@ _{datetime.datetime.now()}_ "token": "tt"}) print("nmhd",res) try: - res = res.json()["success"] + res = res.json() except: s="https://msgpusher.com/push/test111" # s="http://47.108.213.155:11722/push/murmur" @@ -295,8 +294,8 @@ def get_info(data): return str(x) pass sn = "-".join(list(map(h2s,data[12:17]))) - index=int.from_bytes(data[19:20],byteorder="big") - cnt=int.from_bytes(data[20:21],byteorder="big") + index=int.from_bytes(data[20:21],byteorder="big") + cnt=int.from_bytes(data[21:22],byteorder="big") t=f"流水号20{sn} \n序号\[{index}/{cnt}]" print(t) s2wx("","",t)