Follow redirects
All checks were successful
Build and Publish Jimmy.2 / build_and_publish (push) Successful in 7s

This commit is contained in:
Nexus 2024-05-03 19:12:33 +01:00
parent 3dd59318ed
commit 0ff3de0ea4
Signed by: nex
GPG key ID: 0FA334385D0B689F

View file

@ -97,7 +97,7 @@ class ElectionCog(commands.Cog):
"""Gets the current election results"""
await ctx.defer()
async with httpx.AsyncClient(headers=self.HEADERS) as client:
response = await client.get(self.SOURCE)
response = await client.get(self.SOURCE, follow_redirects=True)
if response.status_code != 200:
return await ctx.respond(
"Sorry, I can't do that right now (HTTP %d while fetching results from BBC)" % response.status_code