function extractChilds(crawlNode, $) {
    var links = $("a[href^='/']");
    var url = crawlNode.response.request.uri.protocol + "//" + crawlNode.response.request.uri.host;
    for (var i in links) {
        if (links[i].attribs !== undefined && links[i].attribs['href'] !== undefined) {
            var linkUrl = url + links[i].attribs['href'];
            if (linkUrl !== crawlNode.url && crawlNode.childs.indexOf(linkUrl) === -1) {
                crawlNode.childs.push(new CrawlNode(linkUrl, crawlNode.options, crawlNode));
                console.log(linkUrl);
            }
        }
    }
}
/*
 * Extract all the child pages of a single page. The child extaction will be based on the 
 * crawl options.
 */
Extract all the child pages of a single page. The child extaction will be based on the
crawl options.
Extract all the child pages of a single page . The child extaction will be based on the crawl options .
function extractChilds(crawlNode, $) {
    var links = $("a[href^='/']");
    var url = crawlNode.response.request.uri.protocol + "//" + crawlNode.response.request.uri.host;
    for (var i in links) {
        if (links[i].attribs !== undefined && links[i].attribs['href'] !== undefined) {
            var linkUrl = url + links[i].attribs['href'];
            if (linkUrl !== crawlNode.url && crawlNode.childs.indexOf(linkUrl) === -1) {
                crawlNode.childs.push(new CrawlNode(linkUrl, crawlNode.options, crawlNode));
                console.log(linkUrl);
            }
        }
    }
}
function extractChilds ( crawlNode , $ ) { var links = $ ( "a[href^='/']" ) ; var url = crawlNode . response . request . uri . protocol + "//" + crawlNode . response . request . uri . host ; for ( var i in links ) { if ( links [ i ] . attribs !== undefined && links [ i ] . attribs [ 'href' ] !== undefined ) { var linkUrl = url + links [ i ] . attribs [ 'href' ] ; if ( linkUrl !== crawlNode . url && crawlNode . childs . indexOf ( linkUrl ) === - 1 ) { crawlNode . childs . push ( new CrawlNode ( linkUrl , crawlNode . options , crawlNode ) ) ; console . log ( linkUrl ) ; } } } }
Extract all the child pages of a single page.
Extract all the child pages of a single page .