|
1 | 1 | # AoC Private Leaderboard Stats Updater Script for Reddit |
2 | 2 |
|
3 | | -## Required Environment Variables |
| 3 | +## Required Environment Variables |
4 | 4 |
|
5 | | - |
6 | | -1. `REDDIT_CLIENT_ID`: Reddit API client ID. |
7 | | -2. `REDDIT_CLIENT_SECRET`: Reddit API client secret. |
8 | | -3. `REDDIT_PASSWORD`: Reddit account password. |
9 | | -4. `REDDIT_USERNAME`: Reddit account username. |
10 | | -5. `AOC_SESSION_COOKIE`: Session cookie for the Advent of Code website. |
11 | | -6. `AOC_LEADERBOARD_CODE`: Code for the Advent of Code leaderboard. |
12 | | -7. `REDDIT_POST_ID`: ID of Reddit post which is used as leaderboard. |
| 5 | +1. `REDDIT_CLIENT_ID`: Reddit API client ID. |
| 6 | +2. `REDDIT_CLIENT_SECRET`: Reddit API client secret. |
| 7 | +3. `REDDIT_PASSWORD`: Reddit account password. |
| 8 | +4. `REDDIT_USERNAME`: Reddit account username. |
| 9 | +5. `AOC_SESSION_COOKIE`: Session cookie for the Advent of Code website. |
| 10 | +6. `AOC_LEADERBOARD_CODE`: Code for the Advent of Code leaderboard. |
| 11 | +7. `AOC_LEADERBOARD_REDDIT_POST_ID`: ID of Reddit post which is used as leaderboard. |
13 | 12 |
|
14 | 13 | ---- |
| 14 | + |
15 | 15 | ## Instructions on how to get `AOC_SESSION_COOKIE` |
| 16 | + |
16 | 17 | 1. **Create an Advent of Code Account:** |
17 | 18 | - If you don't have an Advent of Code account, go to the [Advent of Code website](https://adventofcode.com/), and sign up for an account. |
18 | 19 |
|
19 | 20 | 2. **Log into Your AoC Account & open the leaderboard** |
20 | 21 | - After creating an account, log into the AoC website using your credentials. Make sure you have joined the private leaderboard which's ID you have set in `AOC_LEADERBOARD_CODE`. Now navigate to the leaderboard page. |
21 | | - |
| 22 | + |
22 | 23 | 3. **Open Developer Tools in Your Browser:** |
23 | 24 | - Open the browser's developer tools. You can usually do this by right-clicking on the web page, selecting "Inspect" or "Inspect Element," and then navigating to the "Network" tab. |
24 | | - |
| 25 | + |
25 | 26 | 4. **Go to the Network Tab:** |
26 | 27 | - In the developer tools, go to the "Network" tab. This tab will show all network requests made by the website. |
27 | 28 |
|
|
41 | 42 | 9. **Use the Session Cookie:** |
42 | 43 | - Paste the copied session cookie value into the appropriate environment variable (`AOC_SESSION_COOKIE` in this case) in your code or set it as an environment variable. |
43 | 44 |
|
44 | | - |
45 | | - |
46 | | - |
47 | | - |
48 | | - |
| 45 | + |
0 commit comments