Web Scraper for Book Prices with Nokogiri
Build a Ruby scraper that visits book listing pages, extracts titles, prices, and availability using Nokogiri, and stores results in a CSV with price-change tracking across runs. Learners practice HTML parsing with Nokogiri, HTTP requests, and simple data persistence for tracking changes over time.
- Estimate
- ~7.5h
- Steps
- 5
- Completed by
- 0
- Proposed by
- codeseed.app
Nokogiri · HTTParty · CSV
Project roadmap
- 01
Fetch and parse a listing page
~1.5hUse HTTParty to fetch a book listing page and Nokogiri to select title, price, and availability elements.
- 02
Handle pagination
~1.5hFollow pagination links to scrape multiple pages of listings into a single result set.
- 03
Store results with timestamps in CSV
~1.5hAppend each scrape run's results to a CSV file including a timestamp column.
- 04
Detect price changes across runs
~2hCompare the latest scrape to the previous one and print a report of books whose price changed.
- 05
Add polite scraping behavior
~1hAdd request delays and a user-agent header, and handle missing elements without crashing.
Resources
Ready to build this?
Get a GitHub repo and start building. Your AI reviewer checks each step as you go.
Tech stack