This is a simple project which aims to:
- automatically pull potd
- fetch correct solution from editorial
- submit the solution
For this to work as exected, It needs two sets of credentials:
- Decoy creds
- This is used to fetch solutions
- location:
decoy_creds.env
- Real creds
- Used at time of submission
- Submissions will reflect on this account
- location:
real_creds.env
- Empty creds
- used to clear previously set creds on runtime
- use it as a reference while creating
decoy_creds.env
andreal_creds.env
- Python3
- Bash -> (/bin/bash)
- sed
- curl
- Java (java) (dafault)
- C++ (cpp)
All the above commands should be accessible to the current user.
- Create two accounts on GFG, if you already don't have it
- grab the cookies of both accounts and put it in their respective env files
- Install requirements using pip
pip install -r requirements.txt
- start the script
python3 main.py <language>
- Schedule a cron-job to run the script automatically daily
0 3 * * * <absolute path to start file>
- How to get cookies ?
- Open the browser
- Visit official GFG website
- open developer tools in your browser
- head over to cookies section
- Chrome: application -> storage -> cookies
- Firefox: storage -> cookies
- Copy the required cookies
- How to open developer tools ?
- Leave it dude, Its not for everyone xD