add some logging when post fails
This commit is contained in:
parent
98e19c407d
commit
6a10e5744f
11
app.py
11
app.py
|
@ -136,9 +136,14 @@ def main():
|
|||
|
||||
if msg:
|
||||
msg = f"[gray][i]{msg}[/i][/gray]"
|
||||
app.logger.warn(msg)
|
||||
requests.post("https://www.planet-casio.com/Fr/shoutbox/api/post",
|
||||
app.logger.info(msg)
|
||||
r = requests.post("https://www.planet-casio.com/Fr/shoutbox/api/post",
|
||||
data={"message": msg, "channel": "dev"}, cookies=cookie)
|
||||
return "OK"
|
||||
|
||||
if r.status_code == 200:
|
||||
return "OK"
|
||||
else:
|
||||
app.logger.warn(f"Error: {r.status_code}")
|
||||
return f"ERR {r.status_code}"
|
||||
|
||||
return "ACK"
|
||||
|
|
Loading…
Reference in New Issue