Here’s a Python-based sitemap generator that recursively crawls a website and creates a sitemap.xml file. This script uses requests and BeautifulSoup to extract links, and urllib for URL handling.
✅ Python Sitemap Generator
🔧 Requirements
Install dependencies:
📝 Notes
-
The script respects internal domain-only crawling.
-
Limits the crawl to 1000 URLs by default.
-
Outputs a standard
sitemap.xmlsuitable for Google Search Console submission. -
It can be extended to include
<priority>,<changefreq>, or<lastmod>dynamically per URL.
Share this Page your favorite way: Click any app below to share.