Skip to content Skip to sidebar Skip to footer

Failing To Open Https Pages In Phantomjs Using Splinter

I'm trying to use PhantomJS to write a scraper but even the example in the documentation of morph.io is not working. I guess the problem is 'https', I tested it with http and it is

Solution 1:

Splinter uses the Selenium WebDriver bindings (example) for Python under the hood, so you can simply pass the necessary options like this:

withBrowser("phantomjs", service_args=['--ignore-ssl-errors=true', '--ssl-protocol=any']) as browser:
    ...

See PhantomJS failing to open HTTPS site for why those options might be necessary. Take a look at the PhantomJS commandline interface for more options.

Post a Comment for "Failing To Open Https Pages In Phantomjs Using Splinter"