How it works

Note that we set the page limit to 5, but the example actually parsed 7 pages.  The value for CLOSESPIDER_PAGECOUNT should be considered a value that Scrapy will do as a minimum, but which may be exceeded by a small amount.

Get Python Web Scraping Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.