Fetch a given sitemap and retrieve all URLs in it.
Project description
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
fetch_sitemap-19.tar.gz
(8.2 kB
view details)
Built Distribution
File details
Details for the file fetch_sitemap-19.tar.gz
.
File metadata
- Download URL: fetch_sitemap-19.tar.gz
- Upload date:
- Size: 8.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.2 CPython/3.12.3 Darwin/23.4.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fed4d9b858778391273900530ac453c9ba01e292eb498e9b9c394ad52560d14f |
|
MD5 | 028400a4a88366e34ee1dd6a3119632e |
|
BLAKE2b-256 | ec4925d159ecfad8727556dfc03d2453c42ad8f399762c9c7970830632ea47ef |
File details
Details for the file fetch_sitemap-19-py3-none-any.whl
.
File metadata
- Download URL: fetch_sitemap-19-py3-none-any.whl
- Upload date:
- Size: 9.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.2 CPython/3.12.3 Darwin/23.4.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7626908be0ffbc39880799e19d7b2990c92f9a4886b1369aefed25abceb03475 |
|
MD5 | d7a2c3c7e500b1751ea239b9a7774fd2 |
|
BLAKE2b-256 | e3e9f58c0f182acc6eb78baef0f2ef72337c1988657793f2b7a2eeeb31f1ca2d |