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.
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 20
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| fetch_sitemap-20.tar.gz | 8.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| fetch_sitemap-20-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 17.6 kB
Release files / fetch_sitemap-20.tar.gz
| Download URL | fetch_sitemap-20.tar.gz |
|---|---|
| Size | 8.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e6807c06c260065f0f35f18ae314919d475d7b143240de939972370bdc0b5390
|
|
BLAKE2b-256 checksum How to use checksums |
e6ef31787664e990c099da61fe3ca90cfd6251638425156dd463ae5ab452837d
|
| 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-20-py3-none-any.whl
| Download URL | fetch_sitemap-20-py3-none-any.whl |
|---|---|
| Size | 9.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
60bc1de558c635f2a0bf8a4ff538481b62b2458f44a3b16553a808243106e3fe
|
|
BLAKE2b-256 checksum How to use checksums |
f691d35d7380acbeeac38106feca4678a2a60e7d81c1a552749b09ff282d7754
|
| 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
|