# How to parse and dump a sitemap

- **Author:** Viktor Petersson
- **Published:** 2015-03-31
- **Reading time:** 1 min read
- **Tags:** Linux, Python, Webmaster, Seo, Devops

When deling with website migrations, you sometimes need to map out the old content such that you can create your redirect to the new pages.

While doing this, I ran across this little helpful snippet.

Just modify the URL to the sitemap and the script will print out all the pages. You will need [BeautifulSoup 4](http://www.crummy.com/software/BeautifulSoup/) and [Requests](http://docs.python-requests.org/en/latest/).

---

Source: https://vpetersson.com/2015/03/31/how-to-parse-and-dump-a-sitemap/
