HackerTrans
トップ新着トレンドコメント過去質問紹介求人

mrskitch

no profile record

投稿

Creating an open-source solution to the headaches of headless browsers

sourcesort.com
252 ポイント·投稿者 mrskitch·7 年前·98 コメント

コメント

mrskitch
·5 か月前·議論
I enjoyed reading the first few chapters, but wanted a PDF as well. I run browserless.io, so threw a quick script together to PDF-ify this. Gist is here: https://gist.github.com/joelgriffith/0e6a2a774317e845206ca8d....

You can pretty much just create a free plan and run this in our debugger, which will compile the chapters and return PDF. Pretty fun little challenge.
mrskitch
·7 年前·議論
FWIW you can run non-headlessly: https://docs.browserless.io/docs/chrome-flags.html#setting-h...
mrskitch
·7 年前·議論
Just to follow up, you can use our /scrape API to do this:

curl -X POST \ https://chrome.browserless.io/scrape \ -H 'Content-Type: application/json' \ -d '{ "url": "https://reddit.com/", "elements": [{ "selector": "img" }] }'

This will get all the <img> tags on a page and return their attributes (which includes their sources). If you wanted to do scripts as well, just add a new object to the elements array with the "selector" of "script".
mrskitch
·7 年前·議論
Thanks again for the questions. Please do email me if I happen to overlook anything: joel at browserless dot io
mrskitch
·7 年前·議論
++ getting the wordage on _what_ it does and why you'd use it can be tough.
mrskitch
·7 年前·議論
I felt similar, thanks for echoing the sentiment.
mrskitch
·7 年前·議論
Hey! Great to see you here! We’re you with knotch?
mrskitch
·7 年前·議論
The protocol is pretty easy, I think coordinating the necessary “enable” calls is a bit cumbersome. Also the legacy JSON protocol is harder to support, but I understand why.

Hardest part is debugging crash issues and why they happened. You either just get a generic “Page crashed!” error (which I think is puppeteers handler message), or “browser disconnected!”. That and chromes logs are just crazy noisy, which I haven’t gotten a lot out of.

Those are probably the biggest, thanks for asking!
mrskitch
·7 年前·議論
Interesting, I’ll take a look and see if our markup is encoded improperly.
mrskitch
·7 年前·議論
Noted ;)
mrskitch
·7 年前·議論
I spent ~4 hours on my 10th wedding anniversary debugging a production issue. It's not a fun thing to talk about, and doesn't get a lot of attention, but the truth of the matter is that when things are bad _they are bad_. I can see now why folks say that this isn't for everyone.
mrskitch
·7 年前·議論
I've definitely come across your site multiple times, and I can say with absolute certainty it's helpful!
mrskitch
·7 年前·議論
Wow, you said this so much better than I could, thanks for chiming in
mrskitch
·7 年前·議論
Commute was nearly 3 hours for me back when I had to do it. I'd say being remote certainly can help, but has it's own drawbacks as well.

For instance, if you're already programming and working 8+ hours a day in your home, the last thing you want to do is more of it. One of the biggest things you'll want to do is get out more often since you're home a lot, and staying home to work on a side-project doesn't sound awfully appealing.
mrskitch
·7 年前·議論
Nope, you've got it right. We're increasing prices next, however your sentiment is still true. Once we have the enterprise-flavor out the inverse will be true.
mrskitch
·7 年前·議論
We hear about puppeteer-cluster _a lot_, and we hear the same thing from folks (that's it's great). browserless.io essentially does "clustering" at an infrastructure level, whereas puppeteer-cluster does it at the application level.

Both essentially solve the same problem, just in different ways.
mrskitch
·7 年前·議論
Stripe honestly does a lot of this for you. You can hack all that together with what you've got, the problem is that there's some seasonality to business as well as other market effects that make it tough to determine _why_ something is trending one way or the other.

For instance: we had a week last year where we had a flood of cancellations at once and there was nothing I could attribute it to. Looking back it was just a coincidence, however it consumed a lot of my time (writing emails and looking at analytics) to figure out why instead of just pushing ahead.

I was likely over-reacting, but I have noticed there's a lot of people spending a lot of time doing analytics and doing research on trends in stead of just executing. And, especially early on, you should just be executing and not thinking too much about trends.
mrskitch
·7 年前·議論
(Author here): lots of comments about why would someone pay for this. I think the answer is simple if you step out of your developer shoes.

There's a lot of complexity in managing and even building the thing from the start -- and then you have to support it. If you're working in a large org then there's a chance that you can just DIY it, however for small-medium businesses this isn't practical and it's a waste of time (their most precious resource).

I like to think of it as a managed database. Sure, you can freely download postgres in a container and you're up and going, however there's a lot more costs to it than just that. Having a fully-managed database saves you time and other non-tangibles that it can be worth the cost. Just depends on your circumstances.
mrskitch
·7 年前·議論
Sure, but there's a lot of other things you're looking over:

- We support selenium with the same version of Chrome as puppeteer's. Everything is versioned together.

- Queueing/Concurrency and notifications. Arguably done in other efforts, but works.

- Numerous other APIs built on top of puppeteer to do core cases. No need to write your own integration.

- Monitoring and more.

People do pay for this in order to not think about the burden of supporting it. Managed databases are a thing, even though they are freely available to download and run.
mrskitch
·7 年前·議論
Yeah, it's a pretty contrived example on my part. My sentiment here is that there's so many inputs to modeling behavior, and trying to find signal in the noise, that at this scale your time is likely spent better elsewhere. Unless you have the revenue stream to do it and do it well, then the effort can be a time sink