d-wiki
TypeScript icon, indicating that this package has built-in type declarations

0.0.1 • Public • Published

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
  }
})();

Package Sidebar

Install

npm i d-wiki

Weekly Downloads

4

Version

0.0.1

License

MIT

Unpacked Size

104 kB

Total Files

19

Last publish

Collaborators

  • dangjingtao