Phantomjs https

from splinter import Browser

with Browser("phantomjs") as browser:
    # Optional, but make sure large enough that responsive pages don't
    # hide elements on you...
    browser.driver.set_window_size(1280, 1024)

    # Open the page you want...

    # submit the search form...
    browser.fill("q", "parliament")
    button = browser.find_by_css("button[type='submit']")

    # Scrape the data you like...
    links = browser.find_by_css(".search-results .list-group-item")
    for link in links:
        print link['href']

Phantomjs is not working on https urls, can you help me with that ?

Hi @Hastu.

I just gave this sample a run on a little windows 10 box, and it seemed to work ok:

(tmpenv) D:\src>python 

Maybe you can give the url you’re trying & error you’re seeing?

1 Like