aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar ks129 <[email protected]>2020-05-02 08:59:56 +0300
committerGravatar GitHub <[email protected]>2020-05-02 08:59:56 +0300
commit79b6b1519c0c4b4bc46de12e76257d31338d0678 (patch)
tree5babb1fce165baf657c022526283354afa9d3b05
parentMerge the two asynchronous tasks into one to prevent race conditions (diff)
Define encoding in `News` cog `await resp.text()` using
In `News` cog PEP news posting, define `utf-8` as encoding on response parsing to avoid the error. Co-authored-by: Joseph Banks <[email protected]>
-rw-r--r--bot/cogs/news.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/bot/cogs/news.py b/bot/cogs/news.py
index a81a50f21..c716f662b 100644
--- a/bot/cogs/news.py
+++ b/bot/cogs/news.py
@@ -79,7 +79,7 @@ class News(Cog):
await self.sync_maillists()
async with self.bot.http_session.get(PEPS_RSS_URL) as resp:
- data = feedparser.parse(await resp.text())
+ data = feedparser.parse(await resp.text("utf-8"))
news_listing = await self.bot.api_client.get("bot/bot-settings/news")
payload = news_listing.copy()