This project is a fully automated Python bot that emails you 2 unsent LeetCode problems every day, using your last 20 solved problems pulled from a public API: alfa-leetcode-api. You get problem titles, solution links, and basic info delivered to your inbox each morning. No manual selection, no prompts—just consistent revision!
- Fetches latest accepted submissions for your LeetCode account from a free API
- Selects 2 problems per day (FIFO, never repeats until all sent)
- Emails you the titles, links, languages, and timestamps
- Remembers sent problems (local file, no repeats)
- Easy to configure: Just set up your username and email in
config.py - Cloud friendly: Runs as a persistent bot on Railway, Fly.io, or PythonAnywhere
-
Clone this repo:
git clone https://github.com/harshitbilagi/leetcode-revision-agent.git cd leetcode-revision-agent -
Install dependencies:
pip install -r requirements.txt -
Configure your credentials in
config.py:LEETCODE_USERNAME= your LeetCode userEMAIL_USER= your Gmail address (app password required!)EMAIL_PASS= your Gmail app password (see docs)RECIPIENT_EMAIL= your inbox (can be the same as above)
-
Test locally:
python main.pyEmails you 2 new problems instantly (for testing).