5 ms·
Ohh, this is interesting. I'm just now looking for a solution to capture screenshots of websites, ideally from a previously crawled representation. From what I
by 9dev 2y ago
Ohh, this is interesting. I'm just now looking for a solution to capture screenshots of websites, ideally from a previously crawled representation. From what I can gather, all existing offerings just run a Chromium instance and request a screenshot from that, which is pretty expensive (both in operating and as a SaaS product).
So, Blitz should be a pretty ideal fit for that, right? Can it run in headless mode and save a screenshot currently?
- nicoburns 2y agoIt can't, but it'd probably only be a few hours work to add. We'd just need to plug the rendering library we're using into an image encoder rather than a windowing library. There might also be some extra work required to do tiling if you wanted a screenshot that is the full height of the HTML page (bigger than will fit in a single GPU texture), but I can't imagine that would be too hard.
- 9dev 2y agoThat’d be an amazing extension with lots of potential to mix up the existing Screenshot aaS business. I’m no Rust dev, so I can’t help here, but I’ll follow the project closely!
- nkozyra 2y agoGiven general css support is not complete, would you really want a screenshot of something that might look radically different on a commonly used browser?
- nicoburns 2y agoI guess perhaps such functionality will be more useful when the CSS support is more complete?
- nicoburns 2y agoI added an example of rendering to image today. It's a bit rough atm (not very configurable), but it seems reasonably fast.
- nwienert 2y agoYou can use Playwright with Webkit, which is much lighter weight than Chrome.
- the_duke 2y agoMany websites don't render properly anymore without Javascript. A pure "html + css renderer" would probably be of limited utility for screenshotting.
- TimTheTinker 2y agoYou might also look into trying Prince XML. Its happy path is typesetting via HTML/CSS, but it may fit your use case as well.