导出可访问性树¶
该 shot-scraper accessibility
命令将指定 URL 的 Chromium 可访问性树以 JSON 格式导出。
shot-scraper accessibility https://datasette.com.cn/
使用 -o filename.json
将输出写入文件而不是显示它。
添加 --javascript SCRIPT
以在截屏前执行自定义 JavaScript。
shot-scraper accessibility --help
¶
此命令的完整 --help
信息
Usage: shot-scraper accessibility [OPTIONS] URL
Dump the Chromium accessibility tree for the specifed page
Usage:
shot-scraper accessibility https://datasette.io/
Options:
-a, --auth FILENAME Path to JSON authentication context file
-o, --output FILENAME
-j, --javascript TEXT Execute this JS prior to taking the snapshot
--timeout INTEGER Wait this many milliseconds before failing
--log-console Write console.log() to stderr
--fail Fail with an error code if a page returns an HTTP error
--skip Skip pages that return HTTP errors
--bypass-csp Bypass Content-Security-Policy
--auth-password TEXT Password for HTTP Basic authentication
--auth-username TEXT Username for HTTP Basic authentication
--help Show this message and exit.