crawler-ninja-expired
Advanced tools
Comparing version 1.0.1 to 1.0.3
39
index.js
@@ -28,2 +28,6 @@ var fs = require('fs'); | ||
if (params.majecticKey) { | ||
this.majecticKey = params.majecticKey; | ||
} | ||
if (params && params.expiredTxtFile) { | ||
@@ -76,2 +80,3 @@ expiredTxtFile = params.expiredTxtFile; | ||
// don't check twice the same domain | ||
if (this.domains.indexOf(domain) > -1) { | ||
@@ -84,4 +89,7 @@ return callback(); | ||
var self = this; | ||
domainChecker({domain : domain}, function(error, result) { | ||
var params = {domain : domain}; | ||
if (this.majecticKey) { | ||
params.majecticKey = this.majecticKey; | ||
} | ||
domainChecker(params, function(error, result) { | ||
@@ -92,3 +100,3 @@ if (error) { | ||
var line = result.domain + "," + (result.pr ? result.pr : "no-pr") + "," + result.available + "," + (result.whois.toString() ? result.whois.toString(): "no-whois") + "\n"; | ||
var line = getLine(result); | ||
@@ -107,2 +115,27 @@ if (result.available == "NOT-AVAILABLE") { | ||
/** | ||
* Build a new line. the line format is composed of the following data : | ||
* | ||
* domain name, PR, availability, whois, external backlinks, ref domains, ref domains edu, ref domains gov, | ||
* TrustFlow, CitationFlow, TopicalTrustFlow 1, TopicalTrustFlow Value 1, TopicalTrustFlow 2, TopicalTrustFlow Value 2, | ||
* TopicalTrustFlow 2, TopicalTrustFlow Value 2 | ||
*/ | ||
function getLine(result) { | ||
//console.log(result); | ||
var line = result.domain + "," + (result.pr ? result.pr : "no-pr") + "," + result.available + "," + | ||
(result.whois.toString() ? result.whois.toString(): "no-whois"); | ||
if (result.majestic) { | ||
line += result.majestic.ExtBackLinks + "," + result.majestic.RefDomains + "," + | ||
result.majestic.RefDomainsEDU + "," + result.majestic.RefDomainsGOV + "," + | ||
result.majestic.TrustFlow + "," + result.majestic.CitationFlow + "," + | ||
result.majestic.TopicalTrustFlow_Topic_0 + "," + result.majestic.TopicalTrustFlow_Value_0 + "," + | ||
result.majestic.TopicalTrustFlow_Topic_1 + "," + result.majestic.TopicalTrustFlow_Value_1 + "," + | ||
result.majestic.TopicalTrustFlow_Topic_2 + "," + result.majestic.TopicalTrustFlow_Value_2 | ||
} | ||
line += "\n"; | ||
return line; | ||
} | ||
module.exports.Plugin = Plugin; |
{ | ||
"name": "crawler-ninja-expired", | ||
"version": "1.0.1", | ||
"version": "1.0.3", | ||
"description": "Expired domains finder for crawler.ninja", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
10075
169