Skip to main content

fetch-sitemap

Retrieves all URLs of a given sitemap.xml URL and fetches each page one by one. Useful for (load) testing the entire site for error responses.

Sample Output

Note: The default concurrency limit is 5, so five URLs are fetched at once. Depending on your server's worker count, this might already be enough to DoS it. Try --concurrency-limit=2 and increase if you feel comfortable.

Usage: fetch-sitemap [-h] [--basic-auth BASIC_AUTH] [-l LIMIT] [-c CONCURRENCY_LIMIT]
                     [-t REQUEST_TIMEOUT] [--random] [--report-path REPORT_PATH]
                     [-o OUTPUT] [-v]
                     sitemap_url

Fetch a given sitemap and retrieve all URLs in it.

Positional Arguments:
  sitemap_url           URL of the sitemap to fetch

Options:
  -h, --help            show this help message and exit
  --basic-auth BASIC_AUTH
                        Basic auth information. Use: 'username:password' (default: None)
  -l, --limit LIMIT     Maximum number of URLs to fetch from the given sitemap.xml
                        (default: None)
  -c, --concurrency-limit CONCURRENCY_LIMIT
                        Max number of concurrent requests (default: 5)
  -t, --request-timeout REQUEST_TIMEOUT
                        Timeout for fetching a URL in seconds (default: 30)
  --random              Append a random string like ?12334232343 to each URL to bypass
                        frontend cache (default: False)
  --report-path REPORT_PATH
                        Store results in a CSV file (example: ./report.csv) (default:
                        None)
  -o, --output-dir OUTPUT
                        Store all fetched sitemap documents in this folder (default: None)
  -v, --version         Show program's version number and exit

🤺 Local Development

poetry install
poetry run fetch-sitemap -h
poetry run ./tests.sh

Metadata

Release files for fetch-sitemap 13

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fetch-sitemap 13
File Size Uploaded Provenance Actions
fetch_sitemap-13.tar.gz 6.1 kB Without provenance Details for fetch_sitemap-13.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for fetch-sitemap 13
File Interpreter ABI Platform Actions
fetch_sitemap-13-py3-none-any.whl Python 3 none any Details for fetch_sitemap-13-py3-none-any.whl

Total release size: 12.9 kB

Release files / fetch_sitemap-13.tar.gz

Download URL fetch_sitemap-13.tar.gz
Size 6.1 kB
Tags Source
SHA-256 checksum
How to use checksums
8fad3b86f631e8fb610fc8fbc3220366ab8e2e7cfc98001e25842313299dedbe
BLAKE2b-256 checksum
How to use checksums
595a3cb406a7eac9620c54b288cf38e6ebeb1f25ec9013ccdf4095f1dc282d7b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.2 CPython/3.12.3 Darwin/23.4.0

Release files / fetch_sitemap-13-py3-none-any.whl

Download URL fetch_sitemap-13-py3-none-any.whl
Size 6.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7b026e501b533e8169ea39a7b1ecc812dfd2cdd0f406e2b1d1ffabdd031a55c5
BLAKE2b-256 checksum
How to use checksums
1427e46bc303c5978f5e857ef346a6655253d4721c75bc3debc28b938a6d285a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.2 CPython/3.12.3 Darwin/23.4.0

Security for fetch-sitemap 13

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page