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

Installation

$ pip install fetch-sitemap

Usage

$ fetch-sitemap --help

 Usage: fetch-sitemap [OPTIONS] SITEMAP_URL

 Fetch a given sitemap and retrieve all URLs in it.

╭─ Options ──────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ --basic-auth         -a  TEXT       Basic auth information. Format: 'username:password'                            │
│ --limit              -l  INTEGER    Maximum number of URLs to fetch from the given sitemap.xml.                    │
│ --concurrency-limit  -c  INTEGER    Max number of concurrent requests. [default: 5]                                │
│ --request-timeout    -t  INTEGER    Timeout for fetching a URL in seconds. [default: 30]                           │
│ --random             -r             Append a random string like ?12334232343 to each URL to bypass frontend cache. │
│ --random-length          INTEGER    Length of the --random hash. [default: 15]                                     │
│ --report-path        -p  FILE       Store results in a CSV file. Example: ./report.csv                             │
│ --output-dir         -o  DIRECTORY  Store all fetched sitemap documents in this folder. Example:                   │
│                                     /tmp/my.domain.com/                                                            │
│ --slow-threshold         FLOAT      Responses slower than this (in seconds) are considered 'slow'. [default: 5.0]  │
│ --slow-num               INTEGER    How many 'slow' responses to show. [default: 10]                               │
│ --version            -v             Show the version and exit.                                                     │
│ --help                              Show this message and exit.                                                    │
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯

🤺 Local Development

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

Release files for fetch-sitemap 21

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 21
File Size Uploaded
fetch_sitemap-21.tar.gz 8.2 kB Details

Built distribution (wheel)

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

Total release size: 17.8 kB

Release files / fetch_sitemap-21.tar.gz

Download URL fetch_sitemap-21.tar.gz
Size 8.2 kB
Tags Source
SHA-256 checksum
How to use checksums
bc3d5362814628eb999a04c855d8e399b411cb37c894e8ca9ed5d0a0ec2d2cca
BLAKE2b-256 checksum
How to use checksums
7e0653c2a4417d131b20f8b1d39a5acb07e5dbb6bebda59a0722823f164eb24d
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-21-py3-none-any.whl

Download URL fetch_sitemap-21-py3-none-any.whl
Size 9.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
11b029b8e5d100fbd4554393029ee7dc000ba8c199c523b0158d336c2a8d2285
BLAKE2b-256 checksum
How to use checksums
510f926947d34571b7e1d9bb4eb689e2f154e160b4b83d55ae34c15bf3289392
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 history Release notifications | RSS feed

27

2 release files

26

2 release files

25

2 release files

24

2 release files

23

2 release files

22

2 release files

This release

21 This release

2 release files

20

2 release files

19

2 release files

18

2 release files

17

2 release files

16

2 release files

15

2 release files

14

2 release files

13

2 release files

12

2 release files

11

2 release files

10

2 release files

9

2 release files

7

2 release files

6

2 release files

5

2 release files

4

2 release files

3

2 release files

2

2 release files

1

2 release files

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