Help you to fetch your leetcode submissions.
The script runs on Chrome, which means you don't need any running environment. Just install the Chrome.
After runned it, the browser will download a formatted markdown file. This is a generated file demo.
- Using Chrome to open the leetcode, log in, then the redirect to the the submission page
- Open the Chrome Developer Tools console tab.
- Paste the code in index.js in console, then press the Enter in keyboard.
- The script will retry when the request failed. You don't have stop the script when some request failed with 400. (My experience is that a same request may failed more than 50 times. Just retry, it will succeed finally)
- You can customize the markdown template, header or footer. You also can dump a JSON file.
- If you wanna have a try of the script, set
onlyFetchFirstPage = true
, will only fetch the first page submissions. If you wanna dump all,onlyFetchFirstPage = false
- A draft script.. Still need update.