Socket
Socket
Sign inDemoInstall

d-wiki

Package Overview
Dependencies
15
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    d-wiki

A JavaScript wrapper for the wikipedia apis


Version published
Weekly downloads
4
Maintainers
1
Created
Weekly downloads
 

Readme

Source

wikijs

基于nodejs的wiki请求,在 git://github.com/dopecodez/wikipedia.git 基础上增加代理。


const wiki = require("wiki");
(async () => {
  try {
    await wiki.setLang("zh");
    wiki.setProxy(`http://127.0.0.1:1080`);
    // console.log(newUrl);
    const page = await wiki.page("keyword");
    //Response of type @Page object
    const summary = await page.infobox();
    console.log(summary);
    //Response of type @wikiSummary - contains the intro and the main image
  } catch (error) {
    console.log(error);
    //=> Typeof wikiError
  }
})();



Keywords

FAQs

Last updated on 24 Sep 2023

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc