I have solved around 1200 questions over 1 year. The recent most accepted solution can be found in the solutions folder.
- Install
leetcode-cli
by runningnpm install -g leetcode-cli
- Install Chrome Plugin by running
leetcode plugin -i cookie.chrome
- Login using
leetcode user -l -v
. However if this doesn't work it is because Leetcode introduced reCaptcha. To overcome this, login normally using your browser and follow instructions here - Goto https://leetcode.com/api/problems/all/ and download the json to
metadata.json
in the root directory. On chrome an easy way to do this is going toview-source:https://leetcode.com/api/problems/all/
and copy pasting the json data. - Run
python create_bash_script.py
- Run
sh get_ac.sh
The code uses snippets from this article: https://www.foxerlee.top/2020/02/05/Leetcode-crawler/