Get IRC formatting from the v4 server
This commit is contained in:
parent
c2ad050502
commit
e3b7f076ae
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue