@jswork/next-model-douban-book
v1.1.1
Published
Douban book model for next.
Downloads
142
Readme
next-model-douban-book
Douban book model for next.
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.