This python script downloads all of your accepted submissions and saves them in a folder called "correct_submissions" in the same directory as the script. All the submissions are saved as .txt files.
Watch the demonstration below:
-
Clone the repository:
git clone https://github.com/harsh-panchal-804/LeetCode-Submissions-Downloader.git
-
Run the project:
python script.py
- Step 1: Get your LeetCode session cookie from the browser's dev tools.
- Step 2: Replace the
session_cookies
dictionary with your LeetCode session cookie. - Step 3: Run the script.
- If you get an error like
An error occurred: 403 Client Error: Forbidden for url: https://leetcode.com/api/submissions/?offset=580
.Replace theoffset
variable with your last offset and run the script again. Continue this until you have downloaded all the submissions.