diff options
author | 2019-10-23 20:49:13 +0800 | |
---|---|---|
committer | 2019-10-23 20:49:13 +0800 | |
commit | 11726da2903ae95929d3d8b453a37dc9a0411d9b (patch) | |
tree | 487d9416178ad8b7b143d41704257c3ef41be623 | |
parent | Filter draft PRs in query url instead (diff) |
Readd user agent to request header
-rw-r--r-- | bot/seasons/halloween/hacktoberstats.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/bot/seasons/halloween/hacktoberstats.py b/bot/seasons/halloween/hacktoberstats.py index 40c680db..ffcb6eaf 100644 --- a/bot/seasons/halloween/hacktoberstats.py +++ b/bot/seasons/halloween/hacktoberstats.py @@ -238,8 +238,9 @@ class HacktoberStats(commands.Cog): f"&per_page={per_page}" ) + headers = {"user-agent": "Discord Python Hacktoberbot"} async with aiohttp.ClientSession() as session: - async with session.get(query_url) as resp: + async with session.get(query_url, headers=headers) as resp: jsonresp = await resp.json() if "message" in jsonresp.keys(): |