Tools used by OpenStack Documentation
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1.7 KiB

Sitemap Generator

This script crawls all available sites on and extracts all URLs. Based on the URLs the script generates a sitemap for search engines according to the protocol described at


To install the needed modules you can use pip or the package management system included in your distribution. When using the package management system maybe the name of the packages differ. Installation in a virtual environment is recommended.

$ virtualenv venv $ source venv/bin/activate $ pip install -r requirements.txt

When using pip it's maybe necessary to install some development packages. For example on Ubuntu 16.04 install the following packages.

$ sudo apt install gcc libssl-dev python-dev python-virtualenv


To generate a new sitemap file simply run the spider using the following command. It will take several minutes to crawl all available sites on The result will be available in the file

$ scrapy crawl sitemap

It's also possible to crawl other sites using the attribute domain.

For example to crawl use the following command. The result will be available in the file

$ scrapy crawl sitemap -a

To write log messages into a file append the parameter -s LOG_FILE=scrapy.log.

It is possible to define a set of additional start URLs using the attribute urls. Separate multiple URLs with ,.

$ scrapy crawl sitemap -a -a urls=""