Files
tldr/pages.zh/common/pageres.md

864 B

pageres

捕获网站在不同分辨率下的截图。 更多信息:https://github.com/sindresorhus/pageres-cli

  • 在不同分辨率下对多个网址进行多次截图:

pageres {{https://example.com/}} {{https://example2.com/}} {{1366x768}} {{1600x900}}

  • 为特定网址提供选项,覆盖全局选项:

pageres [{{https://example.com/}} {{1366x768}} --no-crop] [{{https://example2.com/}} {{1024x768}}] --crop

  • 提供自定义文件名模板:

pageres {{https://example.com/}} {{1024x768}} --filename={{'<%= date %> - <%= url %>'}}

  • 捕获页面上的特定元素:

pageres {{https://example.com/}} {{1366x768}} --selector='{{.page-header}}'

  • 隐藏特定元素:

pageres {{https://example.com/}} {{1366x768}} --hide='{{.page-header}}'

  • 捕获本地文件的截图:

pageres {{local_file_path.html}} {{1366x768}}