This is a simple Python script for web scraping using BeautifulSoup library. It scrapes a user's profile page on LeetCode, retrieves various statistics, and saves the data in a CSV file.
Before running the script, make sure to install the following libraries:
- csv
- requests
- BeautifulSoup
You can install these libraries by running the following command:
pip install requests beautifulsoup4
To use the script, simply run the web_scraping.py
file in your terminal.
The script will prompt you to enter the username of the LeetCode user whose profile you want to scrape. Once you enter the username, the script will retrieve the user's profile page, scrape various statistics, and save the data in a CSV file called output.csv
.
This project is not licensed under the MIT License - soo there is no lisence details.