get-wikipedia-article
v0.0.4-alpha.0
Published
Fetch Wikipedia article resources (e.g. title, body, links...).
Downloads
2
Maintainers
Readme
if you getting an error related to Fetch, Node's flag option
--no-experimental-fetch
may fix the issue
get-wikipedia-article
Fetch Wikipedia article resources (e.g. title, body, links, ...).
Install
npm i get-wikipedia-article
Usage
import getWikipediaArticle from 'get-wikipedia-article';
const article = await getWikipediaArticle('harry potter', {
// options object (optional)
language: 'es', // ISO 639-1 code (default: 'en')
include: [
// default: ['title', 'body']
'title',
'body',
'related',
'summary',
'links',
'categories',
'description',
'alias',
'label',
],
format: 'html', // 'plain' (default) or 'html'
});
console.log(article);