Fix mkp
This commit is contained in:
parent
b2b0235a02
commit
01598f3b1e
1 changed files with 1 additions and 2 deletions
|
@ -38,13 +38,12 @@ class MisskeyPreviewModule(niobot.Module):
|
|||
self.log.info("Already sent 5 posts, stopping")
|
||||
break
|
||||
resp = await client.get("https://%s/api/v1/statuses/%s" % (parsed.netloc, post_id))
|
||||
self.log.critical(resp)
|
||||
if resp.status_code != 200:
|
||||
self.log.error("Got HTTP %d from %s", resp.status_code, resp.url)
|
||||
continue
|
||||
data = resp.json()
|
||||
self.log.info("Got data: %r", data)
|
||||
username = data["user"]["fqn"]
|
||||
username = data["account"]["fqn"]
|
||||
if not data.get("text"):
|
||||
self.log.warning("No text for post %s", post_id)
|
||||
continue
|
||||
|
|
Loading…
Reference in a new issue