Getting ready

Everything you need is in the 05/02_sitemap.py script, along with the sitemap.py file in then same folder. The sitemap.py file implements a basic sitemap parser that we will use in the main script. For the purposes of this example, we will get the sitemap data for nasa.gov.

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.