index.js
function analyzeHTML(result, $, callback) {

  // if $ is note defined, this is not a HTML page with an http status 200
  if (! $) {
    return callback();
  }

  log.debug({"url" : result.url, "step" : "analyzeHTML", "message" : "Start check HTML code"});

  async.parallel([

    async.apply(crawlHrefs, result, $),
    async.apply(crawlLinks, result, $),
    async.apply(crawlScripts, result, $),
    async.apply(crawlImages, result, $),

  ], callback);

}
function analyzeHTML(result, $, callback) {

  // if $ is note defined, this is not a HTML page with an http status 200
  if (! $) {
    return callback();
  }

  log.debug({"url" : result.url, "step" : "analyzeHTML", "message" : "Start check HTML code"});

  async.parallel([

    async.apply(crawlHrefs, result, $),
    async.apply(crawlLinks, result, $),
    async.apply(crawlScripts, result, $),
    async.apply(crawlImages, result, $),

  ], callback);

}
function analyzeHTML ( result , $ , callback ) { // if $ is note defined, this is not a HTML page with an http status 200
 if ( ! $ ) { return callback ( ) ; } log . debug ( { "url" : result . url , "step" : "analyzeHTML" , "message" : "Start check HTML code" } ) ; async . parallel ( [ async . apply ( crawlHrefs , result , $ ) , async . apply ( crawlLinks , result , $ ) , async . apply ( crawlScripts , result , $ ) , async . apply ( crawlImages , result , $ ) , ] , callback ) ; }
Analyze an HTML page. Mainly, found a.href, links,scripts & images in the page

@param The Http response with the crawl option
@param the jquery like object for accessing to the HTML tags. Null is the resource
is not an HTML
@param callback()
Analyze an HTML page . Mainly found a . href links scripts & images in the page