Releases: simonw/shot-scraper
Releases · simonw/shot-scraper
1.5
- Several new features for the YAML configuration used by shot-scraper multi:
- You can now add a
- server: python -m http.server 8003
block to start a server running before screenshots are taken. The PID for this server will be recorded and the server automatically terminated when the command completes, unless you specify the--leave-server
option in which case it will be left running, useful for debugging. #156 - The
sh: shell command
orpython: python code
blocks can specify Python or shell commands to run before a screenshot is taken. This means a YAML script can make modifications to the environment in between screenshots, useful for things like progressive tutorials. #155
- You can now add a
- Fixed a bug that occurred if a
max-width
was accidentally applied to the<div>
used for region screenshots. Thanks, Johann Klähn. #143 - Documented that
shot-scraper
will quit with an error if a--wait-for
expression has not resolved in 30s.
1.4
- New
--auth-username x --auth-password y
options for eachshot-scraper
command, allowing a username and password to be set for HTTP Basic authentication. #140 shot-scraper URL --interactive
mode now respects the-w
and-h
arguments setting the size of the browser viewport. Thanks, mhalle. #128- New
--scale-factor
option for setting scale factors other than 2 (for retina). Thanks, Niel Thiart. #136 - New
--browser-arg
option for passing extra browser arguments (such as--browser-args "--font-render-hinting=none"
) through to the underlying browser. Thanks, Niel Thiart. #137
1.3
- New
--bypass-csp
option for bypassing any Content Security Policy on the page that prevents executing further JavaScript. Thanks, Brenton Cleeland. #116 - Screenshots taken using
shot-scraper --interactive $URL
- which allows you to interact with the page in a browser window and then hit<enter>
to take the screenshot - it no longer reloads the page before taking the shot (which ignored your activity). #125 - Improved accessibility of documentation. Thanks, Paolo Melchiorre. #120
1.2
- New
--omit-background
option to theshot
command to optionally create transparent PNGs. Thanks, Ben Welsh. #108 - Fixed bug that caused
shot-scraper
to fail to take screenshots on Windows. Thanks, Omer Rosenbaum. #104 - New
--silent
option for theshot
,multi
,pdf
andhtml
commands, to disable the default console output. #107
Full documentation: https://shot-scraper.datasette.io/
1.1.1
1.1
- New
--log-console
option for logging the output of calls toconsole.log()
to standard error. #101 - New
--skip
and--fail
options to specify what should happen if an HTTP 4xx or 5xx error is encountered while trying to load the page.--skip
will ignore the error and either exit cleanly or move on to the next screenshot (in the case ofmulti
).--fail
will cause the tool to return a non-zero exit code, useful for running in CI environments. #102
1.0.1
1.0
- New
shot-scraper html URL
command (documented here) for outputting the final HTML of a page, after JavaScript has been executed. #96 shot-scraper javascript
has a new-r/--raw
option for outputting the result of the JavaScript expression as a raw string rather than JSON encoded (shot-scraper javascript documentation). #95- Tutorial: Automating screenshots for the Datasette documentation using shot-scraper.