Socket
Socket
Sign inDemoInstall

eval-spider

Package Overview
Dependencies
278
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    eval-spider

crawle website


Version published
Weekly downloads
4
Maintainers
1
Created
Weekly downloads
 

Readme

Source

eval-spider -- Programmable spidering of web sites with node.js

Install

From npm:

  npm install eval-spider

(How to use the) API

Creating a Spider

  var spider = require('eval-spider');
  var spider = new spider(options);
spider(options)

The options object can have the following fields:

  • maxPages - Integer containing the maximum Pages to be crawled. Default 10
  • requestThrottle -Integer How many Request at a time. Default 5
  • url - String Website url. Default 'https://medium.com'
  • fileName - String Output File Name . Default 'output.csv'
  • connect - Map Aerospike Db Details . Default {host:(Default : localhost) ,port :(Default 3000),namespace : (Default : test),set:(Default webcrawler),metadata:(Default : {}) }

Queuing an URL for spider to fetch.

spider.crawler() Return a Promise

Response : Response when promise is resolve

  {
  	response : Array, // Result set
  	crawledUrls : Map, // Crawled Urls
  	count : Integer // Number of Crawled Urls
  }

Write response in csv

spider.writeToFile(name,data) - write Data into csv file. Name(string) optional : Result file name, Data(array)

Write response in aerospike

spider.aerospike(data) - write Data into aerospike. Data(array)

FAQs

Last updated on 13 Mar 2017

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc