@jswork/next-model-douban-book

1.1.1 • Public • Published

next-model-douban-book

Douban book model for next.

version license size download

installation

yarn add @jswork/next-model-douban-book

usage

import cheerio from "cheerio";
import "@jswork/next-model-douban-book";

fetch("https://book.douban.com/subject/25941890/")
  .then((res) => res.text())
  .then((res) => {
    var $ = cheerio.load(res, { decodeEntities: false });
    var model = new nx.ModelDoubanBook({ $ });
    var res = model.gets();
    console.log("res: ", res);
    expect(res.title).toBe("海伯利安");
  });

license

Code released under the MIT license.

Readme

Keywords

Package Sidebar

Install

npm i @jswork/next-model-douban-book

Homepage

js.work

Weekly Downloads

3

Version

1.1.1

License

MIT

Unpacked Size

9.82 kB

Total Files

6

Last publish

Collaborators

  • afeiship
  • yujiao.luo