From e3b7f076ae8aedd60a1a442067cf939e940e662d Mon Sep 17 00:00:00 2001 From: Lephenixnoir Date: Tue, 8 Aug 2023 21:14:10 +0200 Subject: [PATCH] Get IRC formatting from the v4 server --- shoutbox.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/shoutbox.py b/shoutbox.py index 689e12f..9031722 100644 --- a/shoutbox.py +++ b/shoutbox.py @@ -22,7 +22,7 @@ class Shoutbox(object): self._handler = Thread(target=self._handle) for channel, last_id in self.channels.items(): - messages = json.loads(r.get(f"https://www.planet-casio.com/Fr/shoutbox/api/read?since={last_id}&channel={channel}&format=text").text)['messages'] + messages = json.loads(r.get(f"https://www.planet-casio.com/Fr/shoutbox/api/read?since={last_id}&channel={channel}&format=irc").text)['messages'] for m in messages: self.channels[channel] = m['id'] @@ -82,7 +82,7 @@ class Shoutbox(object): for channel, last_id in self.channels.items(): # Do not spam with logs logging.getLogger().setLevel(logging.INFO) - messages = json.loads(r.get(f"https://www.planet-casio.com/Fr/shoutbox/api/read?since={last_id}&channel={channel}&format=text").text)['messages'] + messages = json.loads(r.get(f"https://www.planet-casio.com/Fr/shoutbox/api/read?since={last_id}&channel={channel}&format=irc").text)['messages'] logging.getLogger().setLevel(logging.DEBUG) for m in messages: logging.debug(m)