Apify Discord Mirror

Updated 5 months ago

save HTML as a SingleFile with all assets?

At a glance

The community member is looking for a way to integrate the SingleFile package within the PlaywrightCrawler to save HTML with all style and image assets as data strings, as the current method is clunky. Another community member provided links to resources that may help integrate SingleFile with Puppeteer and Crawlee, which the original poster found helpful. The community members also discussed getting the integration to work nicely and offered assistance if needed.

Useful resources
Has anybody had success running this SingleFile package (https://github.com/gildas-lormeau/SingleFile) within PlaywrightCrawler?

I’m trying to save HTML with all style and image assets as data strings, but it’s clunky. This package looks like it would work well if only we could use it within the crawler’s context.

Looking for ideas to integrate this or replicate its features in Playwright. Thanks
C
k
A
4 comments
Hi I found this
https://github.com/gildas-lormeau/SingleFile/issues/723

and this
https://github.com/gildas-lormeau/SingleFile/wiki/How-to-integrate-SingleFile-library-code-in-%22custom%22-environments%3F

that should hopefully allow you to use singleFile with puppeteer and hopefully crawlee?

Great tool, thanks for pointing it out!
Got this working very nicely btw! LMK if you need any assistance
just advanced to level 2! Thanks for your contributions! 🎉
Add a reply
Sign up and join the conversation on Discord