0.0.1 • Published 2 years ago
crawler-main v0.0.1
wiki-crawler
A search and crawler program for Wikipedia articles. Search the articles in wikipedia, get the results or get the page content if the keyword is page itself.
Installation
npm install wiki-crawlerUsage
This is very simple library. Just initiate it and use crawl function. It returns promise back
var crawler = require('wiki-crawler')
crawler.crawl(string.search).then((data) => {
// data contains the result
})Result
data contains following information
type: search || pageit contains the type of data. If the result is actual search result, it contains search, else if it is a page instead, it contains pagetitle: if the result is page, it contains titledescription: if the result is page, it contains descriptionresults: if the result is search result, it contains all the results(array). Each item does havetitleanddescriptioninturn
License
MIT
0.0.1
2 years ago