News for hackers. Stuff that matters.
Re:Web Scraping with Electron by phiresky on Saturday March 09, 2019 @08:19AM (#19345982)
You can run puppeteer with any chromium binary, including non-headless mode.

You can also just start chromium with debugging active `--remote-debugging-port=9222` and then connect to that port and send any dev console commands.

Re:Web Scraping with Electron by TicklishTiger on Saturday March 09, 2019 @08:25AM (#19345999)
How do you send dev console commands to that port?
Re:Web Scraping with Electron by phiresky on Saturday March 09, 2019 @08:38AM (#19346032)
It uses the devtools protocol, see here https://chromedevtools.github.io/devtools-protocol/

Looks like it's a REST protocol.

You have to connect to a tab and then call e.g.

    Runtime.evaluate {expression: "console.log('test')"}
Re:Web Scraping with Electron by phiresky on Saturday March 09, 2019 @08:40AM (#19346039)
Also, you can apparently connect the puppeteer client to a running chrome instance [1]. That way you can use the nice and statically typed puppeteer api and you should have pretty much zero overhead.

[1] https://github.com/GoogleChrome/puppeteer/issues/238