- A simple script which parses though a sitemap and dumps all urls in the sitemap in a text file
- All urls get listed in a file called
urls.txtunder/tmp/site/<domain>/along with the XML version of each sitemap and nested sitemap.
Run the script with a sitemap URL:
./sitescrape https://example.com/sitemap.xmlThen confirm it wrote the expected files under /tmp/site:
find /tmp/site -maxdepth 2 -type fYou should see a domain folder containing urls.txt and any fetched sitemap XML files.