Closed Muneem closed 7 years ago
Is the variable path
set? Probably also the crawler should check better for when the path is not defined and report it clearly. Looks like now it is not the case.
var path=process,env.path
var Crawler = require("js-crawler");
console.log('path = ', path);
new Crawler().configure({depth: 3})
.crawl(path, function onSuccess(page) {
console.log(page.url);
});
yes that is nice suggestion crawler should check for path.Path variable was set but there were double quotes in path variable so it was not crawling.
I am closing this issue now as it was related to double quotes which was mistake on user end
if i set path in variablle then crawler function is not working
like var path=process,env.path
var Crawler = require("js-crawler");
new Crawler().configure({depth: 3}) .crawl(path, function onSuccess(page) { console.log(page.url); });