mirror of
https://github.com/developersIndia/deviras.git
synced 2024-11-23 05:33:12 +05:30
.. | ||
__init__.py | ||
cookie.png | ||
main.py | ||
readme.md |
AoC Private Leaderboard Stats Updater Script for Reddit
Required Environment Variables
REDDIT_CLIENT_ID
: Reddit API client ID.REDDIT_CLIENT_SECRET
: Reddit API client secret.REDDIT_PASSWORD
: Reddit account password.REDDIT_USERNAME
: Reddit account username.AOC_SESSION_COOKIE
: Session cookie for the Advent of Code website.AOC_LEADERBOARD_CODE
: Code for the Advent of Code leaderboard.REDDIT_POST_ID
: ID of Reddit post which is used as leaderboard.
Instructions on how to get AOC_SESSION_COOKIE
-
Create an Advent of Code Account:
- If you don't have an Advent of Code account, go to the Advent of Code website, and sign up for an account.
-
Log into Your AoC Account & open the leaderboard
- 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.
- 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
-
Open Developer Tools in Your Browser:
- 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.
-
Go to the Network Tab:
- In the developer tools, go to the "Network" tab. This tab will show all network requests made by the website.
-
Refresh the Page:
- Refresh the Advent of Code website. This will trigger various network requests, including the one that authenticates your session.
-
Look for the Request with the Cookie:
- In the "Network" tab, look for a network request that is related to the Advent of Code website. It might be named something like "session" or "authenticate."
- Click on this request to view its details.
-
Find the Cookie Information:
- In the details of the network request, look for a section named "Request Headers" or "Cookies." You are interested in the value of the
session
cookie.
- In the details of the network request, look for a section named "Request Headers" or "Cookies." You are interested in the value of the
-
Copy the Session Cookie Value:
- Copy the value of the
session
cookie. It is usually a long hex string of letters and numbers.
- Copy the value of the
-
Use the Session Cookie:
- 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.
- Paste the copied session cookie value into the appropriate environment variable (