What Python-Sitemap does
Python-Sitemap is a small crawler written in Python that walks a site from a starting domain, collects the public links it finds and writes them into a sitemap.xml file. It accepts flags on the command line or reads a config file, and it can follow robots.txt rules, honour canonical tags and leave out pages marked noindex.
Beyond plain URLs, the crawler can emit image and video sitemap entries, hreflang alternate links and a sitemap index when a run grows past the per-file limit. It can resume an interrupted crawl, render client side pages through Playwright and Chromium, and run from a Docker image with the same flags.
Key features
- Image sitemap entries
- Adds each image title, or its alt text when no title exists, plus figure captions as image caption tags.
- Video sitemap entries
- Writes video source as content location, poster attribute as thumbnail, title attribute as video title and figure captions as description.
- Hreflang alternate links
- Emits alternate language link entries so search engines can map translated versions of the same page.
- robots.txt compliance
- Reads the site robots file and skips disallowed URLs, with an option to send a chosen user agent string.
- Canonical tag handling
- Skips pages whose canonical link points to a different address, so duplicates do not enter the sitemap.
- Noindex and nofollow filtering
- By default, pages carrying noindex or nofollow meta tags are left out of the generated sitemap.
- Resumable crawls
- Saves progress so an interrupted run on a large site can continue instead of starting the crawl again.
- JavaScript rendering option
- Renders client side pages from React, Vue or Svelte sites through Playwright and Chromium when the render flag is enabled.
- Sitemap index output
- Splits results into an index file when a crawl holds more URLs than a single sitemap file should carry.
- URL filters and skips
- Skips URLs by file extension, drops parts of addresses with regex and excludes pages matching a filter string.
- Basic authentication
- Crawls protected sites by reading a username and password set in the config file.
How it works
- Clone the repository and make sure a Python interpreter is available, since the script targets the third major version.
- Pass the domain to crawl and the output path, for example through the domain and output flags.
- Add flags or a config file to turn on image, video or hreflang output and to filter URLs.
- The crawler follows internal links, applies robots.txt and canonical rules, and records allowed pages.
- Write the result to sitemap.xml, or to a sitemap index when the run is very large.
Plans and pricing
Released as free software under the GNU General Public License version three, with no paid tiers shown.
Integrations and platforms
Works with
- Docker
- Playwright
- Chromium
Available as
- CLI
Repository facts
- Repositoryc4software/python-sitemap
- LanguagePython
- Stars376
- Forks117
- LicenceGPL-3.0
- Created2012-07-27
- Last commit2026-07-24
- Open issues8
- python
- sitemap
Services and details
Does SEO work itself
Yes
No information yet on keyword research, content optimization, writes content with AI, technical audits, rank tracking, backlinks and link building, local SEO, AI search visibility, free plan or free tools, free trial, API or MCP server, WordPress plugin, browser extension, built for agencies. The website did not say; check with the vendor.
About the company
- Company c4software
- Website: github.com/c4software/python-sitemap
Listing compiled from public sources and the product's own website. Last updated 2026-11-12. Report a correction or request removal. Back to GitHub repos.