aboutsummaryrefslogtreecommitdiffstats
path: root/bot/exts/evergreen/cheatsheet.py
diff options
context:
space:
mode:
authorGravatar Shivansh-007 <[email protected]>2021-02-08 14:08:54 +0530
committerGravatar Shivansh-007 <[email protected]>2021-02-08 14:08:54 +0530
commitaf1d11067daf1304c3c166202c13d8373da9e9b7 (patch)
treed25e1b1ce1fde3eb210ac0bec57c8b49d54a3958 /bot/exts/evergreen/cheatsheet.py
parentAdd curl User Agent Headers (diff)
Add comment explaining why we need to pass curl as user agent
Diffstat (limited to 'bot/exts/evergreen/cheatsheet.py')
-rw-r--r--bot/exts/evergreen/cheatsheet.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/bot/exts/evergreen/cheatsheet.py b/bot/exts/evergreen/cheatsheet.py
index f6dce995..a64ddd69 100644
--- a/bot/exts/evergreen/cheatsheet.py
+++ b/bot/exts/evergreen/cheatsheet.py
@@ -26,6 +26,7 @@ If the problem persists send a message in <#{Channels.dev_contrib}>
URL = 'https://cheat.sh/python/{search}'
ESCAPE_TT = str.maketrans({"`": "\\`"})
ANSI_RE = re.compile(r"\x1b\[.*?m")
+# We need to pass headers as curl otherwise it would default to aiohttp which would return raw html.
HEADERS = {'User-Agent': 'curl/7.68.0'}