This is my fork of Ryan Mitchell’s python-scraping — the companion code samples for the O’Reilly book Web Scraping with Python (2nd Edition). I keep it in my account as study material for the practical side of collecting and parsing data from the web.
The concepts
The samples walk through the full arc of web scraping in Python: fetching pages, parsing HTML, following links, handling forms and sessions, and dealing with the realities of a web that constantly changes underneath your code. Most of the second-edition material lives in Jupyter notebooks, which makes it easy to run a snippet, tweak it, and see the effect immediately. The first-edition code is preserved in a v1 directory for comparison.
How to use it
You work through the notebooks chapter by chapter alongside the book, running and modifying the examples locally. Because the target sites and libraries drift over time, part of the exercise is understanding why a given approach works rather than just executing it.
Running it
Clone the repository, install Jupyter, and open the notebooks locally — the author recommends this over viewing them directly on GitHub, where formatting can render oddly.
Language: Python
Source code: github.com/avnit/python-scraping
Upstream: github.com/REMitchell/python-scraping