Scrape Leetcode Problems and Video Solutions from www.neetcode.io
Neetcode created a YouTube channel and a website to help aspiring developers prepare for their coding interviews. I created a webscraper in selenium that will allow you to scrape Leetcode problems and their respective video solutions from neetcode.io and export them to a local csv file. Very handy if you want to keep notes about certain problems that you struggle with :)
These instructions will get you a copy of the project up and running on your local machine.
- Install the prerequisite packages into your virtual environment using the
requirements.txt
file. The main packages needed for this project areselenium
andbeautifulsoup
After activating your desired venv, run the following:
pip install -r requirements.txt
- Selenium requires a driver to interface with the chosen browser. Make sure the driver is in your path, you will need to add your
driver_path
to theconfig.json
file.
I used the superior Firefox driver as my driver for this project.
Fork and clone/download the repository and change the configuration file with:
- The path to which you would like your csv file to be exported to
Run python main.py
.