node-scraper
node-scraper copied to clipboard
Remote error: TypeError: Cannot read property '_ownerDocument' of undefined
I have two nested scraping calls, and this is thrown on the second one. Unfortunately, this seems to be happening only recently.
Would be great if you can find out whats happening.
To start of with, i can tell you the execution does not cross line 59:scraper.js because $(body) throws the error that i've pasted as the title. (Again, this happens only in the second nested call, not in the first one)
Hi, I encountered a similar issue. I don't get an error message, but the second scraping call only gets executed once and somehow too late. I'm new to both javascript and node.js and I don't understand this behaviour.
Example:
scraper(url, function (e, $) {
// find links
$('x').each(function (i, el) {
scraper(detail, function (e, $) {
// this gets only called once
// after the each iteration completed
// instead, I wanted it to be called
// for every link
});
});
});
Why is that? Thanks.