Hacker News new | ask | show | jobs
by kaylarose 5407 days ago
PhantomJS is one of the better "headless" browsers out there. Webkit-based, Minimal src codebase (Python), and easy to compile (with QT tools).

IMO The API is a little weird though: when evaluating js within a PhantomJS "WebPage" context, it is _completely_ sandboxed. i.e. you can't use closures or otherwise reference any variables outside the scope of your "WebPage" (without work-arounds). This is odd, when you consider that the page is just another var in your script. IMO it kind of breaks some JS paradigms. Not a big deal, but an annoyance none-the-less.