From 54ea92323914b91a65897d8164a9d3d56d62a0c7 Mon Sep 17 00:00:00 2001 From: Harmon Date: Thu, 24 Jan 2019 20:05:40 -0600 Subject: [PATCH] [Discord] Specify HTML parser to process API response for fact command --- Discord/cogs/random.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Discord/cogs/random.py b/Discord/cogs/random.py index 132f5d34a2..c14105bce1 100644 --- a/Discord/cogs/random.py +++ b/Discord/cogs/random.py @@ -307,7 +307,7 @@ async def fact(self, ctx): # uses page, limit, and cb parameters, seemingly to no effect async with clients.aiohttp_session.get(url) as resp: data = await resp.json(content_type = "text/plain") - await ctx.embed_reply(BeautifulSoup(data[0]["fact"]).text, image_url = data[0]["primaryImage"]) + await ctx.embed_reply(BeautifulSoup(data[0]["fact"], "lxml").text, image_url = data[0]["primaryImage"]) @fact.command(name = "cat", aliases = ["cats"]) @checks.not_forbidden()