Answer the question
In order to leave comments, you need to log in
Why can't the parser even find the body on the page?
Hello. Can you please tell me why the selection by tag may not work in my case? Whatever I choose, I always get an empty object. If I try innerHTML - I get instead of an empty html body object.
function getPage(url, proxy) {
const nightmare = Nightmare({
show: true,
switches: {
'proxy-server': proxy[Math.floor(Math.random() * proxy.length)],
'ignore-certificate-errors': false
},
});
return nightmare
.authentication('888', '8888')
.goto(url)
.evaluate(() => {
return [document.querySelector('ul')];
})
.then(data => console.log(data)) // [ {} ]
}
.evaluate(() => {
return document.body; // {}
})
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