Closed farezv closed 10 years ago
Indeed you are.
The request
promise receives an object with the options to the request's request
method.
You should probably do something along this lines,
scraperjs.StaticScraper.create()
.request(options)
// stops the promise chain
.onError(function(err){
console.log(err);
})
//.then(...
//.scrape(...
So I'm trying to scrape a url which seems to keep redirecting only to result in the following error. This is a well documented issue in the request module and I tried to create a
scraperPromise.request(options)
promise with anoptions
object withfollowAllRedirects = false
but that just returns a scraperPromise that's an[object Object]
when I print it to console.Here's the relevant stack trace
Here's how I'm trying to use the request. Not sure how I can proceed further since that console.log never executes. Am I doing something wrong? Any help is appreciated!