We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ef53009 commit b259d86Copy full SHA for b259d86
modules/instagram.py
@@ -106,7 +106,10 @@ async def request(self, url: str):
106
async with self.session.get(
107
url, allow_redirects=False, headers={"User-Agent": "bot"}
108
) as response:
109
- text = await response.text()
+ data = await response.read()
110
+ # because the world is not perfect, and a server that
111
+ # promises utf-8 will not actually return utf-8
112
+ text = data.decode("utf-8", "ignore")
113
return text
114
115
except aiohttp.ClientConnectorError as e:
0 commit comments