Skip to content
This repository was archived by the owner on Apr 1, 2026. It is now read-only.

souvikghosh/quote-scraper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

quote-scraper

A web scraper that extracts quotes from quotes.toscrape.com and saves them to CSV.

Features

  • Scrapes quotes with author and tags
  • Pagination support (scrape multiple pages)
  • Filter by tag
  • CSV output with clean formatting
  • Respectful scraping with configurable delays

Installation

# Clone the repository
git clone https://github.com/souvikghosh/quote-scraper.git
cd quote-scraper

# Create virtual environment
python3 -m venv venv
source venv/bin/activate

# Install dependencies
pip install -e .

Usage

# Scrape all quotes (all pages)
quote-scraper

# Scrape first 3 pages only
quote-scraper --pages 3

# Scrape quotes with a specific tag
quote-scraper --tag love

# Custom output file
quote-scraper --output my_quotes.csv

Output Format

The CSV file contains three columns:

Column Description
text The quote text
author The author's name
tags Pipe-separated list of tags

Example:

text,author,tags
"The world as we have created it is a process of our thinking.",Albert Einstein,change|deep-thoughts|thinking|world

Example

$ quote-scraper --pages 2 --output sample.csv
Starting scrape...
Scraping page 1...
Scraping page 2...
Saved 20 quotes to sample.csv

License

MIT

About

Web scraper that extracts quotes and saves them to CSV

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages