@ablanc/crunchyroll 中文文档教程

发布于 5年前 浏览 20 更新于 3年前

Crunchyroll scrapper

包 build coverage


Description

用于废弃 crunchyroll.fr 内容的 Node.js 模块。

Installation

$ npm install @ablanc/crunchyroll --save

Examples

const crunchyroll = require("@ablanc/crunchyroll");

const list = await crunchyroll.getAnimeList();
const episodes = await crunchyroll.getEpisodes(list[0].link);
const infos = await crunchyroll.getAnimeInfos(list[0].link);

const alphaAnimes = await crunchyroll.getByAlphaNum("a"); // "a-z" || numeric

const popularAnimes = await crunchyroll.getPopularAnime();
const simulcastsAnimes = await crunchyroll.getSimulcastsAnime(); // 40 is the limit tho so > 40 will still return at most 40 animes.
const dramaSliceOfLifeAnimes = await crunchyroll.getByGenresAnime({
  page: 0,
  length: 20,
  tags: ["drama"],
});
const fall2019Animes = await crunchyroll.getBySeasonAnime({
  season: "fall_2019",
});
const lastAnimes = await crunchyroll.getMostRecentsAnime();

const calendar = await crunchyroll.getCalendar();

const calendarTwo = await crunchyroll.getCalendar({
date: "2020-03-22",
free: true,
});

Tests

使用 Jest 框架运行测试。
<代码>$ npm 测试

Crunchyroll scrapper

package build coverage


Description

Node.js module to scrap content of crunchyroll.fr.

Installation

$ npm install @ablanc/crunchyroll --save

Examples

const crunchyroll = require("@ablanc/crunchyroll");

const list = await crunchyroll.getAnimeList();
const episodes = await crunchyroll.getEpisodes(list[0].link);
const infos = await crunchyroll.getAnimeInfos(list[0].link);

const alphaAnimes = await crunchyroll.getByAlphaNum("a"); // "a-z" || numeric

const popularAnimes = await crunchyroll.getPopularAnime();
const simulcastsAnimes = await crunchyroll.getSimulcastsAnime(); // 40 is the limit tho so > 40 will still return at most 40 animes.
const dramaSliceOfLifeAnimes = await crunchyroll.getByGenresAnime({
  page: 0,
  length: 20,
  tags: ["drama"],
});
const fall2019Animes = await crunchyroll.getBySeasonAnime({
  season: "fall_2019",
});
const lastAnimes = await crunchyroll.getMostRecentsAnime();

const calendar = await crunchyroll.getCalendar();

const calendarTwo = await crunchyroll.getCalendar({
date: "2020-03-22",
free: true,
});

Tests

Tests are run using Jest framework.
$ npm test

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文