S
S
sblrok2017-08-01 13:13:22
Parsing
sblrok, 2017-08-01 13:13:22

How to fix a bug in phantomjs?

Good afternoon, I'm trying to write a parser for the site, I use phantomjs to process js (I load the site through phantomjs and transfer it to php), when requested, phantomjs returns an error:
Unhandled promise rejection Error: Request failed due error https://edadeal.ru/web/ client/libs-SaxWoRX8oz.js:1
What could be causing this?
Here is the code:

get.js

"use strict";
var page = require('webpage').create(),
system = require('system'),
url = system.args[1];
page.open(url, function(status)
{
try {
var doc = page.evaluate(function() {
return document.documentElement.innerHTML;
});
console.log(doc);
}
catch (err)
{ console.log(err); }
phantom.exit();
});

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question