Re:Web Scraping with Electron
by TicklishTiger on Saturday March 09, 2019 @08:56AM
(#19346104)
That looks interesting.
Where does that ws tool come from? Is it this one? https://packages.debian.org/stretch/node-ws
How do you send javascript commands over that protocol?
I don't understand this objection. Puppeteer is the client library that you want, and it's not particularly massive. It's the plumbing to handle all of the stuff around starting and connecting to browsers, providing a tidy API to abstract the stuff that's annoying to use directly.
In fact, you can do almost anything you want to using the existing interface that Chrome has built in:
You can connect to it using e.g. the WS command line tool using the URL it spits out: Then you can make it do things: It does what you want, over a web socket interface rather than HTTP.