1.0.2 • Published 7 months ago

wiki-search-fast v1.0.2

Weekly downloads
-
License
MIT
Repository
-
Last release
7 months ago

📚 Wiki-Search

A simple Node.js library to search and retrieve the main text from Wikipedia articles.

Installation

You can install this library using npm or yarn:

npm install wiki-search-fast

Usage

const Search = require('wiki-search-fast');
Search({ lang: "pt", query: "gato" })
  .then(result => {
    console.log(result);
  })
  .catch(error => {
    console.error(error.message);
  });

Parameters

  • lang (optional, default: "pt"): Language code for the Wikipedia site (e.g., "en" for English, "es" for Spanish, "fr" for French).
  • query: The term you want to search on Wikipedia.

Example:

const Search = require('wiki-search-fast'); 
Search({ lang: "en", query: "cat" })
  .then(result => {
    console.log(result);
  })
  .catch(error => {
    console.error(error.message);
});

License

This project is licensed under the MIT License - see the LICENSE.md file for details.

Acknowledgments

This library is built using axios and cheerio.

Happy researching! 📖

1.0.2

7 months ago

1.0.1

7 months ago

1.0.0

7 months ago