This script allows you to download programming problems from GeeksforGeeks as a PDF. You just need to specify the filters on the GeeksforGeeks practice website, copy the URL, and paste it into the script.
- 🔗 Clone or Download the Repository: If you have git installed, you can clone the repository using the following command in your terminal:
git clone https://github.com/Tharunraja7/GeeksforGeeks-Problems-to-PDF.git
Alternatively, you can download the repository directly from GitHub by clicking the Code
button and then Download ZIP
.
- 📁 Navigate to the Repository Folder: Change your current directory to the cloned repository's directory:
cd GeeksforGeeks-Problems-to-PDF
- 📦 Install Required Packages: Install the required Python packages using pip:
pip install -r requirements.txt
This command installs all the Python packages listed in the requirements.txt
file.
- 🖥️ Run the Script: You can run the script using the following command:
python main.py
- 🔗 Enter the URL: When prompted, paste the URL you copied from the GeeksforGeeks practice website. Go to https://www.geeksforgeeks.org/explore?page=1 and apply the filters. Now copy the link. For example: https://www.geeksforgeeks.org/explore?page=1&category=Arrays&company=Amazon&sortBy=submissions. The script will then download the programming problems as a PDF.
You can use Google Colab to run this project in an online Jupyter notebook. Here are two methods to clone the repository in Google Colab:
Method 1: Using the Open notebook option
- Go to Google Colab.
- Click on
File
->Open notebook
. - Select the
GitHub
tab. - Enter the URL of the GitHub repository and press Enter.
- Click on the notebook you want to open.
Method 2: Using the !git clone command
- Go to Google Colab.
- Click on
File
->New notebook
to create a new notebook. - In the first cell of the notebook, clone the repository:
!git clone https://github.com/Tharunraja7/GeeksforGeeks-Problems-to-PDF.git
- Navigate to the cloned repository's directory:
%cd GeeksforGeeks-Problems-to-PDF
- Install the required packages:
!pip install -r requirements.txt
- Run the script in the next cell:
!python main.py
To run a cell, click on the play button to the left of the cell.