Security News
The Dark Side of Open Source
At Node Congress, Socket CEO Feross Aboukhadijeh uncovers the darker aspects of open source, where applications that rely heavily on third-party dependencies can be exploited in supply chain attacks.
@jiltq/wikipedia.js
Advanced tools
Readme
wikipedia.js is a lightweight Node.js module that allows you to easily interact with the Wikipedia REST API
npm i @jiltq/wikipedia.js
yarn add @jiltq/wikipedia.js
pnpm add @jiltq/wikipedia.js
To get a summary of the movie Shrek:
const wiki = require('@jiltq/wikipedia.js');
(async () => {
const page = new wiki.Page('Shrek');
const summary = await page.summary();
console.log(summary);
})();
{
type: 'standard',
title: 'Shrek',
displaytitle: '<i>Shrek</i>',
namespace: { id: 0, text: '' },
wikibase_item: 'Q483815',
titles: { canonical: 'Shrek', normalized: 'Shrek', display: '<i>Shrek</i>' },
pageid: 18717177,
thumbnail: {
source: 'https://upload.wikimedia.org/wikipedia/en/thumb/3/39/Shrek.jpg/218px-Shrek.jpg',
width: 218,
height: 320
},
originalimage: {
source: 'https://upload.wikimedia.org/wikipedia/en/3/39/Shrek.jpg',
width: 220,
height: 323
},
lang: 'en',
dir: 'ltr',
revision: '1061043482',
tid: '751c5fb0-691b-11ec-8473-cb088b6620a5',
timestamp: '2021-12-19T08:17:45Z',
description: '2001 animated film directed by Andrew Adamson and Vicky Jenson',
description_source: 'local',
content_urls: {
desktop: {
page: 'https://en.wikipedia.org/wiki/Shrek',
revisions: 'https://en.wikipedia.org/wiki/Shrek?action=history',
edit: 'https://en.wikipedia.org/wiki/Shrek?action=edit',
talk: 'https://en.wikipedia.org/wiki/Talk:Shrek'
},
mobile: {
page: 'https://en.m.wikipedia.org/wiki/Shrek',
revisions: 'https://en.m.wikipedia.org/wiki/Special:History/Shrek',
edit: 'https://en.m.wikipedia.org/wiki/Shrek?action=edit',
talk: 'https://en.m.wikipedia.org/wiki/Talk:Shrek'
}
},
extract: 'Shrek is a 2001 American computer-animated comedy film loosely based on the 1990 fairy tale picture book of the same name by William Steig. Directed by Andrew Adamson and Vicky Jenson in their directorial debuts, it stars Mike Myers, Eddie Murphy, Cameron Diaz, and John Lithgow as the voices of the lead characters. The film parodies other fairy tale adaptations, primarily aimed at animated Disney films. The story follows the titular Shrek (Myers), an ogre who finds his swamp overrun by fairy tale creatures who have been banished by the corrupt Lord Farquaad (Lithgow) aspiring to be king. Shrek makes a deal with Farquaad to regain control of his swamp in return for rescuing Princess Fiona (Diaz), whom Farquaad intends to marry. With the help of Donkey (Murphy), Shrek embarks on his quest but soon falls in love with the princess, who is hiding a secret that will change his life forever.',
extract_html: '<p><i><b>Shrek</b></i> is a 2001 American computer-animated comedy film loosely based on the 1990 fairy tale picture book of the same name by William Steig. Directed by Andrew Adamson and Vicky Jenson in their directorial debuts, it stars Mike Myers, Eddie Murphy, Cameron Diaz, and John Lithgow as the voices of the lead characters. The film parodies other fairy tale adaptations, primarily aimed at animated Disney films. The story follows the titular Shrek (Myers), an ogre who finds his swamp overrun by fairy tale creatures who have been banished by the corrupt Lord Farquaad (Lithgow) aspiring to be king. Shrek makes a deal with Farquaad to regain control of his swamp in return for rescuing Princess Fiona (Diaz), whom Farquaad intends to marry. With the help of Donkey (Murphy), Shrek embarks on his quest but soon falls in love with the princess, who is hiding a secret that will change his life forever.</p>'
}
FAQs
📜 Wikipedia API wrapper
The npm package @jiltq/wikipedia.js receives a total of 0 weekly downloads. As such, @jiltq/wikipedia.js popularity was classified as not popular.
We found that @jiltq/wikipedia.js demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
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.
Security News
At Node Congress, Socket CEO Feross Aboukhadijeh uncovers the darker aspects of open source, where applications that rely heavily on third-party dependencies can be exploited in supply chain attacks.
Research
Security News
The Socket Research team found this npm package includes code for collecting sensitive developer information, including your operating system username, Git username, and Git email.
Security News
OpenJS is warning of social engineering takeovers targeting open source projects after receiving a credible attempt on the foundation.