index.js
function crawLink($,result,linkTag, callback) {
      var link = $(linkTag).attr('href');
      var parentUrl = result.url;

      if (link) {

          var rel =  $(linkTag).attr('rel');

          if (result.linkTypes.indexOf(rel) > 0) {
              var linkUri = URI.linkToURI(parentUrl, link);

              pm.crawlLink(parentUrl, linkUri, null, null, function(){
                addLinkToQueue(result, parentUrl, linkUri, null, null, callback);
              });
          }
          else {
            callback();
          }
      }
      else {
        callback();
      }
}
function crawLink($,result,linkTag, callback) {
      var link = $(linkTag).attr('href');
      var parentUrl = result.url;

      if (link) {

          var rel =  $(linkTag).attr('rel');

          if (result.linkTypes.indexOf(rel) > 0) {
              var linkUri = URI.linkToURI(parentUrl, link);

              pm.crawlLink(parentUrl, linkUri, null, null, function(){
                addLinkToQueue(result, parentUrl, linkUri, null, null, callback);
              });
          }
          else {
            callback();
          }
      }
      else {
        callback();
      }
}
function crawLink ( $ , result , linkTag , callback ) { var link = $ ( linkTag ) . attr ( 'href' ) ; var parentUrl = result . url ; if ( link ) { var rel = $ ( linkTag ) . attr ( 'rel' ) ; if ( result . linkTypes . indexOf ( rel ) > 0 ) { var linkUri = URI . linkToURI ( parentUrl , link ) ; pm . crawlLink ( parentUrl , linkUri , null , null , function ( ) { addLinkToQueue ( result , parentUrl , linkUri , null , null , callback ) ; } ) ; } else { callback ( ) ; } } else { callback ( ) ; } }
Extract info of html link tag & send the info to the plugins


@param The HTML body containing the link (Cheerio wraper)
@param The http response with the crawl options
@param The link tag
@param callback()
Extract info of html link tag & send the info to the plugins