Skip to content

yjl9903/AnimeGarden

Repository files navigation

🌸 AnimeGarden

version version CI Deploy Worker AnimeGarden

動漫花園 3-rd party mirror site.

home

anime

API Usage

curl "https://garden.onekuma.cn/api/resources?page=1&pageSize=10"

You can find the interactive Open API document here and more API usage example in scripts/api.http.

If you are using JavaScript / TypeScript, you can just use the API wrapper fetchResources and fetchResourceDetail in package animegarden.

Packages

animegarden

version

A scraper for 動漫花園.

import { fetchDmhyPage, fetchResources } from 'animegarden'

// Fetch the first page of 動漫花園
const dmhy = await fetchDmhyPage(fetch)

// Fetch the first page of Anime Garden mirror site
const resources = await fetchResources(fetch)

// Fetch all the resources which match some filter conditions
const sakurato = await fetchResources(fetch, { count: -1, fansub: 619 })

Assume your environment has built-in Fetch. If not you can use undici or ofetch.

You can check more filter conditions FilterOptions and usage examples in ./scripts/ directory.

anitomy

version

A TypeScript port of Anitomy inspired by AnitomySharp with more optimization for 動漫花園.

import { parse } from 'anitomy'

const info = parse(`[Lilith-Raws] 熊熊勇闖異世界 PUNCH! / Kuma Kuma Kuma Bear S02 - 02 [Baha][WEB-DL][1080p][AVC AAC][CHT][MP4]`)
{
  "audio": {
    "term": "AAC",
  },
  "episode": {
    "number": 2,
    "numberAlt": undefined,
    "title": undefined,
  },
  "file": {
    "checksum": undefined,
    "extension": "MP4",
    "name": "[Lilith-Raws] 熊熊勇闖異世界 PUNCH! / Kuma Kuma Kuma Bear S02 - 02 [Baha][WEB-DL][1080p][AVC AAC][CHT][MP4]",
  },
  "language": "CHT",
  "month": undefined,
  "release": {
    "group": "Lilith-Raws",
    "version": undefined,
  },
  "season": "2",
  "source": "WEB-DL",
  "subtitles": undefined,
  "title": "熊熊勇闖異世界 PUNCH! / Kuma Kuma Kuma Bear S02",
  "type": undefined,
  "video": {
    "resolution": "1080p",
    "term": "AVC",
  },
  "volume": {
    "number": undefined,
  },
  "year": undefined,
}

Local Development

Follow CONTRIBUTING.md to setup the environment and start developing.

Credits

License

MIT License © 2023 XLor