Follow redirects
All checks were successful
Build and Publish Jimmy.2 / build_and_publish (push) Successful in 7s
All checks were successful
Build and Publish Jimmy.2 / build_and_publish (push) Successful in 7s
This commit is contained in:
parent
3dd59318ed
commit
0ff3de0ea4
1 changed files with 1 additions and 1 deletions
|
@ -97,7 +97,7 @@ class ElectionCog(commands.Cog):
|
||||||
"""Gets the current election results"""
|
"""Gets the current election results"""
|
||||||
await ctx.defer()
|
await ctx.defer()
|
||||||
async with httpx.AsyncClient(headers=self.HEADERS) as client:
|
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:
|
if response.status_code != 200:
|
||||||
return await ctx.respond(
|
return await ctx.respond(
|
||||||
"Sorry, I can't do that right now (HTTP %d while fetching results from BBC)" % response.status_code
|
"Sorry, I can't do that right now (HTTP %d while fetching results from BBC)" % response.status_code
|
||||||
|
|
Loading…
Reference in a new issue