diff options
| author | 2020-05-02 08:59:56 +0300 | |
|---|---|---|
| committer | 2020-05-02 08:59:56 +0300 | |
| commit | 79b6b1519c0c4b4bc46de12e76257d31338d0678 (patch) | |
| tree | 5babb1fce165baf657c022526283354afa9d3b05 | |
| parent | Merge 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.py | 2 |
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() |