Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

crawler-ninja-expired

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

crawler-ninja-expired - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

39

index.js

@@ -10,5 +10,7 @@ var fs = require('fs');

var EXPIRED_TXT_FILE = process.cwd() + "/expireds.txt";
var NOT_AVAILABLE_TXT_FILE = process.cwd() + "/not-available-errors.txt";
var crawlLog = logs.Logger;
var expiredTxtFile = EXPIRED_TXT_FILE;
var notAvailableTxtFile = NOT_AVAILABLE_TXT_FILE;
/**

@@ -30,2 +32,9 @@ * Find expired domains

}
if (params && params.notAvailableTxtFile) {
notAvailableTxtFile = params.notAvailableTxtFile;
}
this.domains = [];
}

@@ -39,6 +48,9 @@

this.expiredLog.info({"50*" : true, status : result.statusCode, url : result.url});
check(URI.domain(result.uri), callback);
this.check(URI.domain(result.uri), callback);
}
callback();
else {
callback();
}
}

@@ -52,3 +64,3 @@

this.expiredLog.info({expired : true, domain : domain, url : result.url});
check(URI.domain(result.uri), callback);
this.check(URI.domain(result.uri), callback);
}

@@ -64,4 +76,13 @@ else {

check = function(domain, callback) {
Plugin.prototype.check = function(domain, callback) {
crawlLog.info({"url" : domain, "step" : "expired-domains-plugin", "message" : "check"});
if (this.domains.indexOf(domain) > -1) {
return callback();
}
else {
this.domains.push(domain);
}
var self = this;
domainChecker({domain : domain}, function(error, result) {

@@ -74,3 +95,11 @@

var line = result.domain + "," + (result.pr ? result.pr : "no-pr") + "," + result.available + "," + (result.whois.toString() ? result.whois.toString(): "no-whois") + "\n";
fs.appendFile(expiredTxtFile, line);
if (result.available == "NOT-AVAILABLE") {
fs.appendFile(notAvailableTxtFile, line);
}
else {
fs.appendFile(expiredTxtFile, line);
}
callback();

@@ -77,0 +106,0 @@ });

2

package.json
{
"name": "crawler-ninja-expired",
"version": "1.0.0",
"version": "1.0.1",
"description": "Expired domains finder for crawler.ninja",

@@ -5,0 +5,0 @@ "main": "index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc