A beginner-friendly Python script that scrapes quotes and authors from any site structured like quotes.toscrape.com, and exports the results into a clean CSV file.
- Scrapes quotes and authors from multiple pages
- Automatically formats and saves to a
.csvfile - User selects the number of pages to scrape
- Menu interface for repeat use without restarting the program
- Python 3.7+
requestsbeautifulsoup4
pip install requests beautifulsoup4- Clone the repo:
git clone https://github.com/gandalf-ddj/web_scraper_csv.git
cd web_scraper_csv- Run the script:
python main.py- Follow the prompts:
- Enter the base URL
- Choose how many pages to scrape
- Name your CSV file
Sample CSV output format:
Quote,Author
"The world as we have created it is a process of our thinking...",Albert Einstein
"It is our choices, Harry, that show what we truly are...",J.K. Rowling
- The program appends
/page/Xto paginate automatically. - Meant for educational purposes β always respect
robots.txtand site terms when scraping.
This project is part of a growing Python portfolio, built with a focus on:
- Real-world use cases
- User interaction
- Dynamic content parsing