81 points · by fanf2 · 8y ago · 34 comments
One of the most active browser automation libs out there and it's just a pure joy to use =)
Firefox did start investigating supporting the Chrome DevTools Protocol: https://groups.google.com/d/topic/mozilla.dev.platform/4-4A8...
We (Chrome DevTools/Puppeteer team) have had detailed discussions with their DevTools team on this, recommending what subset would enable Puppeteer. I don't know where they are with this, but in the long-term, this solution looks most promising.
Shameless fanboy moment: have followed your stuff for years, and I absolutely love the products your team(s) put out (CDP/Puppeteer)!
Anyone from Mozilla know where to follow the work for this?
Personally, if I were to set up automated testing, I'd like to do it with both Chrome and FF, especially given that FF seems to be making a comeback lately. Another reason might be that I've never had anything but problems building Chromium from source, but have successfully built Firefox. So in situations where you want to know with certainty that your binary is derived from the published source code, Firefox wins IMO.
What influence are you talking about? Can you be more specific?
For Web Testing spinning up the browser is okay, for some other tasks using just a headless version can be good enough.
I found browserless.io and the supporting github project over the weekend, looks promising.
Who else is doing this? Is the architecture I just touched on the right way to go about doing this? Or should I have each sidekiq job spin up its own browser container for the scraping job?
Also, chrome vs firefox won't really matter in this instance, but reliability/performance/memory will...any recommendations?
This is approximately how I was thinking of settings thing up as well, so thanks for this!
https://github.com/RealEstateWebTools/property_web_scraper
Will dig into your code to see what I can learn.
Chrome headless should be fastest. And if you're printing to pdf phantom and chrome had the better ability to do that..
I had each sidekiq job spinning up its own process -- and needed to do some X display avoidance.
https://docs.slimerjs.org/master/release-notes-1.0.html
"With Firefox 56 and more, SlimerJS can be trully headless by adding the –headless option on the command line"
So that could be an interesting thing to play with. I've thought about just having my sidekiq jobs spin up a docker container with the browser in it and then just limiting the amount of jobs at once for resource constraints, and now seeing your comment I think I might just give it a shot.