Closed kevinrademan closed 3 years ago
What does the body variable contains in your case? Is it undefined
, null
?
Hey, pitching in here as I was facing the same issue. The body variable contains a Buffer-object while a String is probably expected. Looking at the code I guess that the problem is that no encoding is set for the request. If I set an encoding using spider.config({encoding: "utf8"), it did work fine.
So this is probably related to https://github.com/medialab/sandcrawler/issues/177 to some degree ;-)
I got the body.match is undefined error while using the crawler. One of the links on the site I was crawling redirected to https://www.facebook.com/unsupportedbrowser
The static engine then throws an error on this line https://github.com/medialab/sandcrawler/blob/master/src/engines/static.js#L119
Changing that line to fixes the problem
Would you recommend that for a fix?