Skip to content Skip to sidebar Skip to footer

How To Remotely Fetch Answer Of Phantomjs Script Run On Heroku?

I want to fetch some information from a website using the phantomjs/casperjs libraries, as I'm looking for the HTML result after all javascripts on a site are run. I worked it out

Solution 1:

If I understand you correctly you're talking about interprocess communication - so that Phantom's result (the page HTML) can somehow be retrieved by the app.

per the phantom docs, couple options:

  • write the HTML to a file and pick up the file in your app
  • run the webserver module and do a GET to phantom, and have the phantom script respond with the page HTML

see http://phantomjs.org/api/webserver/


Post a Comment for "How To Remotely Fetch Answer Of Phantomjs Script Run On Heroku?"