Skip to content

Commit

Permalink
advent: Add user-agent header to leaderboard requests
Browse files Browse the repository at this point in the history
  • Loading branch information
TheOnlyMrCat committed Dec 4, 2024
1 parent 6fdd5cb commit 0a0a192
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions uqcsbot/advent.py
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,7 @@ def _get_leaderboard_json(self, year: int, code: int) -> Json:
response = requests.get(
LEADERBOARD_URL.format(year=year, code=code),
cookies={"session": self.session_id},
headers={"user-agent": "github.com/UQComputingSociety/uqcsbot-discord"},
allow_redirects=False, # Will redirct to home page if session token is out of date
)
except RequestException as exception:
Expand Down

0 comments on commit 0a0a192

Please sign in to comment.