Answer the question
In order to leave comments, you need to log in
How to open instagram with phantomjs?
Can't open instagram homepage with phantomjs (tried 2.1, 1.9)
var page = require('webpage').create();
page.viewportSize = { width:1024 , height: 768 };
page.settings.userAgent = 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.71 Safari/537.36';
url = 'https://www.instagram.com/';
page.open( url, function() {
setTimeout(function() {
console.log('before render');
page.render('insta.png');
phantom.exit();
}, 5000);
});
driver = Selenium::WebDriver.for :phantomjs
driver.get 'https://www.instagram.com/'
wait = Selenium::WebDriver::Wait.new(:timeout => 500)
wait.until { driver.find_elements(name: 'password').length != 0 }
puts 'page loaded'
Answer the question
In order to leave comments, you need to log in
the solution was to add the keys --ignore-ssl-errors=true --ssl-protocol=any
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question