News for hackers. Stuff that matters.
Re:Show HN: Chromda – Serverless Website Screenshots by whoisjuan on Monday December 30, 2019 @01:06AM (#21911182)
This is very impressive (the way that is implemented on top AWS services).

I would be curious to see how accurate it is when it comes to rendering. I have a Screenshot as a Service side project (https://getscreenshot.rasterwise.com) that is also build with Puppeteer, but accuracy is a completely different animal.

Out of the box Puppeteer is really not that accurate so you need fine tune it to address a huge amount of rendering edge cases.

This is the area where most services come short imo. I have put a lot of effort into optimizing my service accuracy but it’s a never-ending task. There always seems to be one website that doesn’t render the way it’s supposed to be rendered.

I really don’t understand why headless browsers seem to be developed with UI rendering as a low priority. Simulating a viewport is not equal to simulating an actual screen.

Re:Show HN: Chromda – Serverless Website Screenshots by cjr on Monday December 30, 2019 @05:05AM (#21912273)
I hear you. I run Urlbox (https://urlbox.io) and accuracy is one of the hardest parts, as well as scaling hundreds or thousands of instances of chrome since it’s a real memory hog.

I also managed to get a version of the urlbox renderer working on lambda but it fails on some websites due to the /tmp space limits, for example trying to do a full page screenshot of a heavy page like dailymail would use up all of the available disk space in the lambda environment with chrome’s media cache.

Re:Show HN: Chromda – Serverless Website Screenshots by whoisjuan on Monday December 30, 2019 @11:39AM (#21914553)
Love what you have done with URLBOX dude! That's my goal standard when it comes to improving accuracy for GetScreenshot. I have tested with your website preview and I think both of our solutions nail accuracy, but you have been longer in this game so you probably have way more edge cases covered. I still find myself trying to address new edge cases every certain time.
Re:Show HN: Chromda – Serverless Website Screenshots by artur_makly on Monday December 30, 2019 @04:15PM (#21916789)
We managed to screenshot DailyMail.co.uk very well ..no coding required: https://app.visualsitemaps.com/share/6a79e25354f16408731b860...
Re:Show HN: Chromda – Serverless Website Screenshots by bhl on Tuesday December 31, 2019 @04:46PM (#21924999)
Isn’t there also a memory limit with using Puppeteer? Last time I checked, there was a hard coded memory value for screenshots within Chrome.
Re:Show HN: Chromda – Serverless Website Screenshots by appwiz on Monday December 30, 2019 @12:05AM (#21910943)
Very nice! You should publish it to the Serverless App Repo (https://aws.amazon.com/serverless/serverlessrepo/)
Re:Show HN: Chromda – Serverless Website Screenshots by pritambarhate on Monday December 30, 2019 @02:55AM (#21911590)
One thing from the readme that concerns me:

S3_ACL "public-read"

It will be great if you can explain why and how is this used in the ReadMe file.

Re:Show HN: Chromda – Serverless Website Screenshots by grenoire on Monday December 30, 2019 @03:32AM (#21911730)
Searching the constant will yield one use in the code, further Googling yields https://docs.aws.amazon.com/AmazonS3/latest/dev/acl-overview...
Re:Show HN: Chromda – Serverless Website Screenshots by lfarzati on Monday December 30, 2019 @12:18PM (#21914933)
This is for making the uploaded images in S3 accessible by anyone. The rationale is that the screenshots can be viewed by browsers without any sort of authorization.

But since this is just an environment setting, you can change it if your use case is different.

Re:Show HN: Chromda – Serverless Website Screenshots by tlarkworthy on Monday December 30, 2019 @07:23AM (#21912841)
Oh cool. I did a similar thing for snapshotting Unity games https://corepox.net/devlog/visual-game-worlds-hosted-on-func.... The joy of Chrome is that it has a webGL software implementation, so you don't need to spin up GPUs to get a graphical runtime of a 3D game engine.
Re:Show HN: Chromda – Serverless Website Screenshots by the_resistence on Wednesday January 01, 2020 @11:53PM (#21933125)
Definitely a noob at npm, when I run 'npm install', it freezes at:

[ ......] / extract:aws-sdk: sill extract [email protected] extracted to /home/foo/serverless_apps/chromda/node_modules/.staging/...

Any tips or tricks would be much appreciated?

Re:Show HN: Chromda – Serverless Website Screenshots by the_resistence on Thursday January 02, 2020 @01:32AM (#21933419)
Never mind. No idea why but installed after multiple tries.
Re:Show HN: Chromda – Serverless Website Screenshots by arvinaminpour on Monday December 30, 2019 @01:18AM (#21911229)
Was looking at building something similar on top of Lambda but I'm so happy that I found this!

Quickly browsed through the code and I don't think it supports local pages but might throw a PR your way to add support if you don't mind. Thanks!

Re:Show HN: Chromda – Serverless Website Screenshots by sharma_pradeep on Monday December 30, 2019 @04:38AM (#21912149)
Is there any javascript library to do the same? It would be useful to have a library as a dependency and just initialize it in the code and then you have screenshot in meta of each page
Re:Show HN: Chromda – Serverless Website Screenshots by guillem_lefait on Monday December 30, 2019 @06:19AM (#21912575)
Isn't a problem with lambda to have a potential CPU waiting time of 30 seconds ?
Re:Show HN: Chromda – Serverless Website Screenshots by SwiftyBug on Monday December 30, 2019 @02:34PM (#21915990)
I'm not sure I get what you meant. One AWS Lambda function can run for up to 15 minutes.
Re:Show HN: Chromda – Serverless Website Screenshots by throw03172019 on Tuesday December 31, 2019 @04:46AM (#21919961)
I think they meant run time which means they are concerned about how much it will cost since lambda charges by run time.
Re:Show HN: Chromda – Serverless Website Screenshots by guillem_lefait on Tuesday December 31, 2019 @05:35AM (#21920115)
Yeah, that's correct, my question was about costs.