eval-spider
v2.1.0
Published
crawle website
Downloads
5
Readme
eval-spider -- Programmable spidering of web sites with node.js
Install
From npm:
(How to use the) API
Creating a Spider
spider(options)
The options
object can have the following fields:
maxPages
- Integer containing the maximum Pages to be crawled. Default 10requestThrottle
-Integer How many Request at a time. Default 5url
- 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
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)