Live data from Hacker News

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

github.com

41–50 of 107 posts

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

#41
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 "

Firefox equivalent: firefox -screenshot file.png https://example.com --window-size=1280,720 A bit annoyingly, it won't work if you have Firefox already open.

> it won't work if you have Firefox already open

now try and go ahead how you could isolate these instances so they cannot see each other. this leads into a rabbit hole of bad design.

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

#42
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 "

Firefox equivalent: firefox -screenshot file.png https://example.com --window-size=1280,720 A bit annoyingly, it won't work if you have Firefox already open.

Does it work if you use a different profile with -p?

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

#43

Earlier quoted context omitted.

Firefox equivalent: firefox -screenshot file.png https://example.com --window-size=1280,720 A bit annoyingly, it won't work if you have Firefox already open.

Does it work if you use a different profile with -p?

Maybe with --no-remote

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

#44

That's nice and everything but what to do about the EU cookie banners? Does hosting outside of the EU help?

Would recommend using SeleniumBase's CDP mode to search for those substrings, click accept on those cookie banners and then take screenshot.

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

#45
post #26

If you’re worried about the security risks, edge cases, maintenance pain and scaling challenges of self hosting there are various solid hosted alternatives: - https://browserless.io - low level browser control - https://scrapingbee.com - scraping specialists - https://urlbox.com - screenshot specialists* They’re all profitable and have been around for years so you can depend on the businesses and the tech. * Disclosu…

Do these services respect norobot manifests? Isn't this all kinda... illegal...? Or at least non-consensual?

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

#46
post #16

Earlier quoted context omitted.

The website [1] is very strange. What does U.S. stand for? If I were to stumble on this I'd assume it was a fishing / scam website trying to impersonate the government. Bad vibes all around. [1] - https://us.ai/

I'll try to improve the vibes :( I've been working at this startup for almost two years now and that page and branding etc has been changing a lot as you can imagine ...

A) Thanks for sharing your OSS with the world!!

B) I'm also a little confused. Surely that domain cost(s) $$$ -- why not go with a cute "us" branding rather than "U.S."? Unless you're looking to sell in other countries where maybe U.S. expertise is a selling point, this definitely comes across like you're pretending to be part of the government.

EDIT: For comparison, we.ai costs $500,000/y (!!!)

EDIT2: It looks like you're positioning yourself as a defense/govt contractor, thus the branding? That's certainly cool, but IMHO, if I were you and owned that domain, I'd offer it to Palantir for $$$$$ and just go with your second choice. They're currently starting in on a whole genocide/global war thing, so they have cash to burn!

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

#47
post #45
post #26

If you’re worried about the security risks, edge cases, maintenance pain and scaling challenges of self hosting there are various solid hosted alternatives: - https://browserless.io - low level browser control - https://scrapingbee.com - scraping specialists - https://urlbox.com - screenshot specialists* They’re all profitable and have been around for years so you can depend on the businesses and the tech. * Disclosu…

Do these services respect norobot manifests? Isn't this all kinda... illegal...? Or at least non-consensual?

robots.txt isn't legally binding. I am interested to know if and how services even interact with it. It's more like a clue on when the interesting content for scrapers is on your site. This is how I imagine it goes:

"Hey, don't scrape the data here."

"You know what? I'm scrape it even harder!"

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

#48
post #46
post #16

Earlier quoted context omitted.

I'll try to improve the vibes :( I've been working at this startup for almost two years now and that page and branding etc has been changing a lot as you can imagine ...

A) Thanks for sharing your OSS with the world!! B) I'm also a little confused. Surely that domain cost(s) $$$ -- why not go with a cute "us" branding rather than "U.S."? Unless you're looking to sell in other countries where maybe U.S. expertise is a selling point, this definitely comes across like you're pretending to be part of the government. EDIT: For comparison, we.ai costs $500,000/y (!!!) EDIT2: It looks like…

Hi thanks! The domain actually used to be a redirect link to U.S. Automotive Industries (a trade publication). I reached out to them and got a deal, so it was a lot for me but not, like, we.ai expensive lol.

The name was always a corporate placeholder and I liked the idea of US Steel or General Electric type names. Some startups have done similar things, and many people actually like the name a ton. But I know it's controversial and so any products I made have their own names and branding that's pretty separate (see: Abbey).

Over the past few months I've gone the gov contracting route and the name actually made some sense, so I've used it raw. Still, the plan is to get a DBA in the near future and switch it up. Thanks for the advice!

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

#49
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 "

Firefox equivalent: firefox -screenshot file.png https://example.com --window-size=1280,720 A bit annoyingly, it won't work if you have Firefox already open.

> A bit annoyingly, it won't work if you have Firefox already open.

I hate it when applications do this.

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

#50
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 "

Quick note: when trying to do full page screenshots, Chrome does a screenshot of the current view, then scrolls and does another screenshot. This can cause some interesting artifacts when rendering pages with scroll behaviors. Firefox does a proper full page screenshot and even allows you to set a higher DPS value. I use this a lot when making video content. Check out some of the args in FF using: `:screenshot --help…

That's not the behavior I'm seeing (with Puppeteer). Any elements positioned relative to the viewport stay within the area specified by screen size (eg. 1200x800) which is usually the top of the page. If the browser would scroll down these would also move down (and potentially appear multiple times in the image). Also intersection observers which are further down on the page do not trigger when I do a full-page screenshot (eg. an element which starts animation when it enters into the viewport).
Post reply on HN