Skip to content

Commit 068d694

Browse files
committed
Added script for scraping n leetcode problems according to varying difficulty
1 parent 6e6e6d1 commit 068d694

File tree

6 files changed

+135
-441
lines changed

6 files changed

+135
-441
lines changed

LeetCode-Scrapper/README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# LeetCode Scraper
2+
This python script will let the user to scrape 'n' number of LeetCode problems from any category/difficulty in [Leetcode](https://leetcode.com/problemset/all) ,as provided by the user. The functionality of the script is to gain the information regarding particular codechef problem in different PDFs.
3+
4+
## Prerequisites:
5+
Download the required packages from the following command in you terminal.(Make sure you're in the same project directory)
6+
7+
` pip3 install -r requirements.txt `
8+
9+
To run this script, you need to have selenium installed and configure webdriver to use chrome browser in your$PATH. You can directly download chrome driver from the link below- https://chromedriver.chromium.org/downloads. Further, if this argument is not specified, it will search path, otherwise you can set the path to chromedriver using
10+
11+
` driver = webdriver.Chrome('/path/to/chromedriver') `
12+
13+
## To Run the script:
14+
After installing all the requirements,run this command in your terminal.
15+
16+
` python3 ques.py `
17+
18+
## Output:
19+
This script will generate 'n' number of different PDFs in the same folder to store the problem information, specifically problem title, problem statement, test cases, and the problem link.

LeetCode-Scrapper/format.py

Lines changed: 0 additions & 8 deletions
This file was deleted.

0 commit comments

Comments
 (0)