Zirak / SO-ChatBot

Other
124 stars 62 forks source link

Use promises #264

Open Zirak opened 8 years ago

Zirak commented 8 years ago

Check first if they're available under nightmare. If they are, no reason not to.

allquixotic commented 8 years ago

Nightmare 2.1.3 uses a modern version of Chromium via Electron, and so it should support them approximately when the latest stable Chrome does.

Nightmare 1.8.x, which is where we're currently at, uses whatever version of PhantomJS you install locally on your system. Meaning:

You could, in theory, move to Nightmare 2.1.3, but then you'd be marrying yourself to the Chromium runtime. While it's nice to have it packaged within the Node ecosystem, I have a preference for Selenium, since it would allow us to have a run-headless.config.js option for selecting the browser to use -- that way the end-user could use run-headless.js for old or new versions of Firefox, Chrome, PhantomJS, or even some other browser like Edge.

I have a lot more thoughts on why not to move to Nightmare 2.1.3 that are in my other issue about using Nightmare 1.8.2.

allquixotic commented 8 years ago

Also, QtWebKit is not really being maintained by anybody except for security updates and some infrequent pulls from WebKit2's upstream JSCore (which itself is not being extremely well-maintained, especially compared to V8, ChakraCore and FF), because all the developer momentum is behind QWebEngine. QWebEngine, in turn, is an out of process instance of Blink (aka Chromium), and does not support true headlessness.

More info.

To properly support a modern, updated, browser environment, our best way forward may be to rewrite run-headless.js to use Selenium (I can work on that if you want; I'm very familiar with it) and require a modern FF/Chrome/Edge as the browser behind it.