News for hackers. Stuff that matters.
Re:Show HN: OpenFaaS template for headless Chrome and Puppeteer by alexellisuk on Tuesday January 05, 2021 @12:15PM (#25647808)
The latest addition here is to show how to capture screenshots from locally rendered HTML/CSS - perfect for social banners. Sites like Banner bear (no affiliation) are charging a fee for this kind of function, and all the better for it. Folks should charge for their work.

But if you are comfortable hosting openfaas (3 EUR / mo on Hetzner using faasd) then you can do it a lot cheaper and run additional webhooks / APIs / blogs / integrations there too.

A banner generation website will cost 49 USD / mo for 1000 images, 99 USD / mo for 10,000 images. Or 3 EUR / mo for faasd.

https://github.com/openfaas/faasd

Re:Show HN: OpenFaaS template for headless Chrome and Puppeteer by gbrindisi on Tuesday January 05, 2021 @01:59PM (#25649448)
Hey Alex I just wanted to say that I read your blog with pleasure! Thanks for all the sharing

https://blog.alexellis.io/

Re:Show HN: OpenFaaS template for headless Chrome and Puppeteer by alexellisuk on Tuesday January 05, 2021 @02:54PM (#25650159)
Thank you, I appreciate it. Do check out my GitHub profile for my sponsors link - I send out weekly emails and have an additional portal that folks can log into too. https://github.com/alexellis/
Re:Show HN: OpenFaaS template for headless Chrome and Puppeteer by shog_hn on Tuesday January 05, 2021 @12:27PM (#25648002)
Nice! I'm sure I'll find a use for this sort of integration in the near future. Thanks for including great documentation and a tutorial link on the github page.
Re:Show HN: OpenFaaS template for headless Chrome and Puppeteer by alexellisuk on Tuesday January 05, 2021 @12:36PM (#25648164)
You're welcome. There's even more for OpenFaaS sponsors in the "Treasure Trove", feel free to check it out if you want to get more value, and support OSS at the same time - https://github.com/sponsors/openfaas
Re:Show HN: OpenFaaS template for headless Chrome and Puppeteer by lma21 on Tuesday January 05, 2021 @01:22PM (#25648878)
(a bit off topic - apologies for that), I find OpenFaaS fascinating. Where can I find case studies / documented use-case for its usage?
Re:Show HN: OpenFaaS template for headless Chrome and Puppeteer by alexellisuk on Tuesday January 05, 2021 @02:56PM (#25650182)
Did you try the docs, the blog or YouTube? You'll find plenty of information there. Feel free to start with https://github.com/openfaas/faas/blob/master/ADOPTERS.md

https://www.youtube.com/watch?v=bt06Z28uzPA

Re:Show HN: OpenFaaS template for headless Chrome and Puppeteer by abc03 on Tuesday January 05, 2021 @05:29PM (#25652100)
Just discovered your article “Introduction to web testing and scraping” and will try it out. Exactly had the problem of scaling last time I tried out to run several headless browser. Thanks for this!
Re:Show HN: OpenFaaS template for headless Chrome and Puppeteer by alexellisuk on Wednesday January 06, 2021 @03:49AM (#25655855)
Do you mean https://www.openfaas.com/blog/puppeteer-scraping/ ?

There are more traditional tools and SaaS services based around the web-driver model, which might be useful for folks who don't want to get into infrastructure, and don't want the latency of using Lambda. In testing I saw 15s+ for visiting a simple website that took 1-2s locally in a container.

Feel free to give the content a try and let us know how it goes for you? OpenFaaS can also run these tasks async and queue them up / process from a queue.