获取给定的网站地图并检索其中的所有URL。
项目描述
fetch-sitemap
检索给定sitemap.xml URL的所有URL并逐页获取。用于(负载)测试整个网站的错误响应非常有用。
安装
$ pip install fetch-sitemap
用法
$ 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 INT [>=1] Maximum number of URLs to fetch from the given sitemap.xml. │
│ --recursive/--no-recursive Recursively fetch all sitemap documents from the given sitemap.xml. [default: recursive] │
│ --concurrency-limit -c INT [>=1] Max number of concurrent requests. [default: 5; >=1] │
│ --request-timeout -t INT [>=1] Timeout for fetching a URL in seconds. [default: 30; >=1] │
│ --random -r Append a random string like ?12334232343 to each URL to bypass frontend cache. │
│ --random-length INT [1 to 100] Length of the --random hash. [default: 15; 1 to 100] │
│ --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 [>=0.0] Responses slower than this (in seconds) are considered 'slow'. [default: 5.0; >=0.0] │
│ --slow-num INTEGER OR "ALL" How many 'slow' responses to show. [default: 10] │
│ --user-agent TEXT User-Agent string set in the HTTP header. [default: Mozilla/5.0 (compatible; fetch-sitemap/23)] │
│ --version Show the version and exit. │
│ --help Show this message and exit. │
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
🤺 本地开发
poetry install
poetry run fetch-sitemap -h
poetry run ./tests.sh
项目详情
下载文件
下载您平台的文件。如果您不确定选择哪个,请了解更多关于安装包的信息。
源分发
fetch_sitemap-26.tar.gz (9.1 kB 查看哈希值)
构建分发
fetch_sitemap-26-py3-none-any.whl (9.9 kB 查看哈希值)
关闭
fetch_sitemap-26.tar.gz的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | eca6f7f0f7326721398808bb8d6b4baa8eb17f031949d84e571692ddf96ad82a |
|
MD5 | fd4312a7c9491f39238e60395769ca81 |
|
BLAKE2b-256 | 4823b3de1f369e7268462750f46a6e6486d66760fa5a28d14d08ccf02003dd1e |
关闭
fetch_sitemap-26-py3-none-any.whl的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | b6f30d0dc018674bd44b7fd35fe059a22d13a008668ab91b7c80aa91d92fe97d |
|
MD5 | d8e399d660718096cbf26616dae176e1 |
|
BLAKE2b-256 | e79769c98c06b19021d10c1444ef5efaf059ea3ba892a7d64409ff4fcf1adaae |