如果你用 shot-scraper 做自动化截图或 PDF,这次更新让 server 等待更靠谱,还能直接从 GitHub 加载 JS 脚本,省去写内联代码的麻烦。
shot-scraper 1.11 改进了 server 机制,将固定的一秒延迟替换为最多等待30秒的端口轮询,使 shot-scraper video 和 shot-scraper multi 能适应启动较慢的服务器。新增 --js-file 选项,支持从本地文件、标准输入或 gh:username/script 加载 JavaScript,替代原有的 --javascript 参数。shot-scraper multi 也添加了对应的 js_file YAML 键。shot-scraper javascript 和 shot-scraper html 命令新增 --timeout 选项,与其他命令保持一致。
shot-scraper 1.11
Release: shot-scraper 1.11 Some minor improvements, mainly around command option consistency and making the server: mechanism used by both shot-scraper video and shot-scraper multi work if the server takes longer than a second to start serving traffic. server: processes used by shot-scraper multi and shot-scraper video now wait up to 30 seconds for the target URL to accept connections, polling for port availability and replacing the previous fixed one-second delay. #197 The shot-scraper , pdf , html , accessibility and har commands now have a --js-file option for loading JavaScript from a local file, standard input or gh:username/script , as an alternative to --javascript which accepts the string of JavaScript directly as an argument. #192 shot-scraper multi supports the equivalent js_file: YAML key. The shot-scraper javascript and shot-scraper html commands now have a --timeout option for consistency with other commands. #118 Tags: shot-scraper