Answer the question
In order to leave comments, you need to log in
How to open a new page and get a new value from it?
There is a function that receives a list of urls, you need to open your page for each url and get the value.
Something like this:
function something(urls){
var ret = [];
for (var i = 0; i < urls.length; i++){
var newpage = require('webpage').create();
var data = newpage.open(urls[i], function(status) { return document.getElementById(...).innerText; })
ret.push(data);
}
return ret;
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question