-
-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
It would be great to have an omit_background
option so you can take transparent PNG screenshots
#108
Comments
Seeing an error with this in CI: https://github.com/simonw/shot-scraper/actions/runs/4815473826/jobs/8574190652
|
Looks like the error is from: shot-scraper/tests/run_examples.sh Lines 33 to 37 in ebc2e90
That gives me the same error locally too:
|
It's because |
This worked without an error: shot-scraper https://simonwillison.net/ \
-h 800 -o examples/simonwillison-transparent.png \
--javascript "document.querySelector('body').style.backgroundColor='transparent'" \
--omit-background And produced this image (which has a transparent background, though you can't see that on GitHub Issues because the background here is white too): |
It's in the options, but I don't think it's available.
https://playwright.dev/python/docs/api/class-locator#locator-screenshot-option-omit-background
The text was updated successfully, but these errors were encountered: