Live data from Hacker News

Show HN: An API that takes a URL and returns a file with browser screenshots

github.com

1–10 of 107 posts

Re: Show HN: An API that takes a URL and returns a file with browser screenshots

#2
I'm working on a project that requires automated website screenshots, and I've hit the cookie banner problem. I initially tried a brute-force approach, cataloging common button classes and text to simulate clicks, but the sheer variety of implementations makes it unmanageable. So many different classes, button texts etc. I've resorted to "https://screenshotone.com", because it takes a perfect screenshot every time, never had a single cookie banner visible on the screenshots.

I would really like to know how this is handled. Maybe there is someone here that can share some knowledge.

Re: Show HN: An API that takes a URL and returns a file with browser screenshots

#6
Being a bit frustrated with Linkwarden’s resource usage, I’ve thought about making my own self hosted bookmarking service. This could be a low effort way of loading screenshots for these links, very cool! It‘ll be interesting how many concurrent requests this can process.

Re: Show HN: An API that takes a URL and returns a file with browser screenshots

#7
post #4

For anyone who might not be aware, Chrome also has the ability to save screenshots from the command line using: chrome --headless --screenshot="path/to/save/screenshot.png" --disable-gpu --window-size=1280,720 " https://www.example.com "

Oh man, I needed this so many times didn't even think of doing it like this. I tried using Selenium and all different external services. Thank you!

Works in chromium as well.

Re: Show HN: An API that takes a URL and returns a file with browser screenshots

#8
post #4

For anyone who might not be aware, Chrome also has the ability to save screenshots from the command line using: chrome --headless --screenshot="path/to/save/screenshot.png" --disable-gpu --window-size=1280,720 " https://www.example.com "

Very nice, I didn't know this. I used pyppeteer and selenium for this previously which seemed excessive.
Post reply on HN