Electron Scraper Skeleton
There's a bit to "grok" when using Electron like this so here's the breakdown of what fits where. index.js is loaded inside your main Electron app process which loads index.html into the "main" BrowserWindow, and note they don't share any scope. Next, index.html contains a "webview" which will load the site you're interested in scraping. And finally, injected.js is autoloaded into the same scope as the webview, so it can access the DOM, and it can also load nodejs modules. But the wrinkle is that injected.js can't communicate with any code in index.html without using Electron's IPC services.
What's in here?
There's a couple of files that are mostly just stubs.
How do I run this?
You should be able to just run:
npm install ./node_modules/electron/dist/electron .
Oh but is there more?
Just one more! As of 3/17/17 it's possible to use the Tor client as a SOCKS proxy which Electron can be configured to use. So if you download and launch Tor you can launch Electron with the following to pipe your traffic through Tor:
./node_modules/electron/dist/electron --proxy-server="socks5://localhost:9150" .
And then to get a fresh IP address via a new Tor circuit you can run 'killall -HUP tor'