A Python web scraper for collecting car listings from Turo, extracting detailed information, and exporting data to CSV files. This project uses selenium
with undetected-chromedriver
to scrape the data and BeautifulSoup
to parse the HTML.
- Scrapes car listings: Collects car details such as name, rating, number of trips, location, prices, and discount.
- Visits individual car pages: Extracts additional details such as options, description, and characteristics.
- Handles dynamic content: Uses
selenium
to manage JavaScript-rendered content. - Saves data to CSV: Exports the collected data to a CSV file for further analysis.
- Python 3.7+
- Install the required packages:
beautifulsoup4 undetected-chromedriver selenium argparse
- Clone the repository:
git clone https://github.com/MahdiKheireddine/turo_car_scraper.git cd turo_car_scraper pip install -r requirements.txt
- Run the scraper:
python main.py "location" "start_date" "end_date"
- Replace "location", "start_date", and "end_date" with your desired values. For example:
python main.py "paris" "07/27/2024" "07/30/2024"