Will post the leaderboard to Slack
The app is hosted on https://www.pythonanywhere.com/, using the Hacker $5/month
plan, because I want the script to run
twice a day
/home/USERNAME/slack.py
/home/USERNAME/advent_of_code.py
/home/USERNAME/run.py
The tasks run in UTC timezone, so in Norwegian winter-time, GMT+1, the times are 10:00 and 20:00
- Daily 09:00
python /home/USERNAME/run.py <aoc_api_url> <aoc_session_cookie> <aoc_join_code> <slack_webhook_url>
- Daily 19:00
python /home/USERNAME/run.py <aoc_api_url> <aoc_session_cookie> <aoc_join_code> <slack_webhook_url>
- Create a Slackbot and get the webhook URL
- Should look like this:
https://hooks.slack.com/services/<SECRET>/<SECRET>/<SECRET>
- Should look like this:
- Create a leaderboard on Advent of Code and get the API URL
- Should look like this:
https://adventofcode.com/<year>/leaderboard/private/view/<ID>.json
- Get the join code
- Inspect element and find the header called
Cookie
and get the session value
- Should look like this: