Horseman js https blank page

167 Views Asked by At
 var horseman = new Horseman({
        timeout: 30000,
        ignoreSSLErrors: true,
        sslProtocol: 'tlsv1',
         phantomOptions: {
            'proxy' : "proxy.crawlera.com:8010",
            'proxy-auth' : "8888"
         }
    });

var test = horseman
        .userAgent('Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.71 Safari/537.36')
        .open('https://www.amazon.co.uk').html()
                .then(function(html){
                    console.log(html);
                });

horseman using PhantomJS from $PATH +0ms
  horseman .setup() creating phantom instance 1 +430ms
  horseman phantom created +2s
  horseman phantom version 2.1.1 +22ms
  horseman page created +18ms
  horseman phantomjs onLoadFinished triggered success NaN +20ms
  horseman injected jQuery +77ms
  horseman .userAgent() set Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.71 Safari/537.36 +26ms
  horseman .headers() +2ms
  horseman .open() https://www.amazon.co.uk +12ms
  horseman phantomjs onLoadFinished triggered success 1 +1s
  horseman injected jQuery +23ms
  horseman .waitForNextPage() +16ms
  horseman .waitForNextPage() completed successfully +60ms
  horseman .html() undefined +1ms
<head></head><body></body>

return '<head><body></body></head>' whats problem ? i used ssl-protocol:any but no results. used many userAgents but it gave me empty html. PhantomJS:2.1.1, Node:8.1.2

0

There are 0 best solutions below