Show HN: An API that takes a URL and returns a file with browser screenshots
1–10 of 107 posts
Re: Show HN: An API that takes a URL and returns a file with browser screenshots
#2I'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
#3us ai?
Re: Show HN: An API that takes a URL and returns a file with browser screenshots
#4For 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"
Re: Show HN: An API that takes a URL and returns a file with browser screenshots
#5I’m looking forward to giving this a go. Great idea!
Re: Show HN: An API that takes a URL and returns a file with browser screenshots
#6Being 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
#7For 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
#8For 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.
Re: Show HN: An API that takes a URL and returns a file with browser screenshots
#9us ai?
the very same
Re: Show HN: An API that takes a URL and returns a file with browser screenshots
#10That's nice and everything but what to do about the EU cookie banners? Does hosting outside of the EU help?