A web scraper built using Java Spring Boot, Jsoup, Thymeleaf, and jQuery to extract product details like Name, Price, and Rating from various e-commerce websites. This tool also allows users to download the scraped data as a CSV file for easy analysis. 📊
- Overview
- Features
- Tech Stack
- Installation
- Usage
- API Endpoints
- Screenshots
- Contributing
- License
- Contact
This project is part of my internship at Prodigy, where I was tasked with building a product scraping tool to extract data from e-commerce websites. The application allows users to enter the URL of a product page, scrape the data, display the products in a table, and download the results as a CSV file. 🧰
- 🛒 Extract product details (Name, Price, Rating) from e-commerce websites.
- 📝 Input validation for website URLs.
- 🎨 Beautiful, responsive UI using Bootstrap and custom styling.
- ⬇️ Download scraped product data as CSV.
- 🚀 Easy-to-use interface with clear instructions.
- 🔐 Error handling for invalid URLs or scraping failures.
- Backend: Java, Spring Boot
- Frontend: Thymeleaf, HTML, CSS, Bootstrap, jQuery
- Scraping: Jsoup (Java HTML parser)
- Database: None (data scraped on demand and not stored)
- Tools: Maven for dependency management
- Clone the repository:
git clone https://github.com/yourusername/product-scraper.git cd product-scraper
- Install the required dependencies:
Ensure you have Maven installed, then run:
mvn clean install
- Run the application:
mvn spring-boot:run
- Access the application
- Open your browser and navigate to http://localhost:8080.
- Enter the URL of an e-commerce product page (e.g., Amazon, Flipkart).
- Click on the Scrape button.
- Scraped product data will be displayed in the table.
- You can download the product data by clicking on the Download CSV button.
- Books :
- Amazon (for product data):
- Flipkart (for product data):
- eBay (for product data):
- AliExpress (for product data):
- Walmart (for product data):
- BestBuy (for product data):
- Snapdeal (for product data):
- The following endpoints are available in this application:
- Scrape Products (POST /api/scrap/scrape)
- Input: URL of the e-commerce page.
- Response: JSON array of product details (name, price, rating).
- Download CSV (POST /api/scrap/download)
- Input: JSON array of product details.
- Response: CSV file containing the scraped data.
Contributions are welcome! 🎉 If you'd like to improve this project, feel free to submit a pull request. Before contributing, please ensure your code adheres to the following guidelines:
- Code must be properly documented.
- Ensure backward compatibility with previous versions.
- Follow coding best practices for Java and Spring Boot.
- Product Scraper is an open-source project You’re free to use, modify, and distribute it.
- © 2024 Deepak Singh | deepsinghkumar01@gmail.com