RubyPDF Blog software PhantomJS Static Windows Version with SSL support

PhantomJS Static Windows Version with SSL support

From Google Code of PhantomJS , you can download PhantomJS 1.2.0 Windows executable – Static. More compact, but does not support https. and said, this version is statically linked, therefore HTTPS is not supported. For HTTPS support please download the dynamic version. (You can only download dynamic build version now.)

With some effort, I compile a static version with https/ssl support, if you like it, please download here.

PhantomJS is a headless WebKit with JavaScript API. It has fast and native support for various web standards: DOM handling, CSS selector, JSON, Canvas, SVG. The official web site is phantomjs.org.

PhantomJS is cross-platform, it can be compiled for Linux, Windows, FreeBSD, and Mac OS X. PhantomJS scripts can be written in JavaScript or CoffeeScript.

Here a 14-line PhantomJS script which finds pizzeria in New York (using Google Places), along with the address and the telephone number:

page = new WebPage()
page.open 'http://www.google.com/m/local?site=local&q=pizza+in+new+york',
  (status) ->
    if status isnt 'success'
      console.log 'Unable to access network'
    else
      results = page.evaluate ->
        pizza = []
        list = document.querySelectorAll 'div.bf'
        for item in list
          pizza.push(item.innerText)
        return pizza
      console.log results.join('\n')
    phantom.exit()

Get the code and build it, and then enjoy some more simple and advanced examples, covering:

  • running regression tests from command line
  • getting driving direction
  • showing weather forecast conditions
  • finding pizza in New York
  • looking up approximate location based on IP address
  • pulling the list of seasonal food
  • producing PDF version of a Wikipedia article
  • rasterizing SVG to image

For questions and feedback, please post to phantomjs mailing-list.

PhantomJS is based on Qt. There are two implementations, using C++ and Python.

2 thoughts on “PhantomJS Static Windows Version with SSL support”

  1. I have a question about compiling static version.

    I couldn’t compile QtWebkit as static library.

    Let me know how you could do it.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.