https://github.com/oussemabenhassena5/laptop-scraper
πΈοΈ Advanced web scraper for extracting comprehensive laptop product information from TunisiaNet using Python, Selenium, and multi-format data export.
https://github.com/oussemabenhassena5/laptop-scraper
python selenium webcrawler webscraping
Last synced: about 2 months ago
JSON representation
πΈοΈ Advanced web scraper for extracting comprehensive laptop product information from TunisiaNet using Python, Selenium, and multi-format data export.
- Host: GitHub
- URL: https://github.com/oussemabenhassena5/laptop-scraper
- Owner: oussemabenhassena5
- License: mit
- Created: 2025-02-03T19:48:28.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-03T21:59:53.000Z (over 1 year ago)
- Last Synced: 2025-04-09T12:36:20.640Z (about 1 year ago)
- Topics: python, selenium, webcrawler, webscraping
- Language: Python
- Homepage:
- Size: 338 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# π TunisiaNet Laptop Scraper
## π Advanced Web Scraping Solution for Tech Products



## π Project Overview
`TunisiaNet Laptop Scraper` is an advanced web scraping tool designed to extract comprehensive product information from TunisiaNet's laptop catalog. This powerful Python script leverages Selenium to navigate, extract, and transform web data into multiple, easily consumable formats.
## β¨ Key Features
- π Comprehensive Product Scraping
- Extract detailed laptop information
- Navigate through multiple product pages
- Handle dynamic web content
- π¦ Multiple Output Formats
- JSON
- CSV
- Excel
- Markdown Report
- SQLite Database
- π Advanced Data Visualization
- Price distribution plot
- Detailed statistical analysis
- π‘οΈ Robust Error Handling
- Comprehensive logging
- Flexible data extraction
## π Prerequisites
- Python 3.8+
- Chrome Browser
- Chrome WebDriver
## π Quick Setup
1. Clone the Repository
```bash
git clone https://github.com/yourusername/Laptop-Scraper.git
cd Laptop-Scraper
```
2. Create Virtual Environment
```bash
python3 -m venv venv
source venv/bin/activate # On Windows, use `venv\Scripts\activate`
```
3. Install Dependencies
```bash
pip install -r requirements.txt
```
## π₯οΈ Usage
Run the scraper:
```bash
python scraper.py
```
## π Project Structure
```
Laptop-Scraper/
β
βββ scraper.py # Main scraping script
βββ requirements.txt # Project dependencies
βββ results/ # Output directory
β βββ products.json
β βββ products.csv
β βββ products.xlsx
β βββ products_report.md
β βββ price_distribution.png
β
βββ logs/ # Logging directory
βββ tunisianet_scraper_TIMESTAMP.log
```
## π― Output Examples
### π JSON Sample
```json
{
"title": "Pc Portable HP 15-Fd0051nk / I3-N305 / 32 Go / 512 Go SSD / Gold",
"reference": "[A2AN9EA-32]",
"description": "Γcran Full HD 15.6\" (1920 x 1080), antireflet - Processeur Intel Core i3-N305, (jusquβΓ 3.8 GHz, 6 Mo de mΓ©moire cache) - MΓ©moire 32 Go DDR4 - Disque SSD NVMe M.2 512 Go - Carte graphique Intel UHD IntΓ©grΓ© - Wi-Fi 6 - Bluetooth 5.3 - Clavier complet gris clair avec pavΓ© numΓ©rique - CamΓ©ra HP True Vision HD 720p - Doubles haut-parleurs - 1x USB-C - 2x USB-A - 1x HDMI 1.4b - 1x prise combinΓ©e casque/microphone - FreeDOS - Couleur Gold - Garantie 1 an",
"price": "1 305,000 DT",
"availability": "En stock",
"img_url": "https://www.tunisianet.com.tn/401810-home/pc-portable-dell-vostro-3530-i3-1305u-24-go-512-go-ssd-noir.jpg"
}
```
### π Price Distribution Visualization

### π Markdown Report Snapshot
- **Total Products:** 714
- **Price Analysis:**
- Minimum Price: 500 DT
- Maximum Price: 13000 DT
- Average Price: 1500 DT
## π€ Contributing
1. Fork the repository
2. Create your feature branch
3. Commit your changes
4. Push to the branch
5. Create a Pull Request
## β οΈ Disclaimer
This tool is for educational purposes. Always respect website terms of service and robots.txt.
## π License
MIT License
---
**Happy Scraping! π·οΈπ**