@gxaym1/anime
v1.0.0
Published
Orx Scraper — topcinemaa.cam anime scraper: browse, search, details, download links with qualities, and VidTube direct link resolver.
Maintainers
Readme
@gxaym1/anime
Orx Scraper — topcinemaa.cam anime scraper.
Browse, search, get details, extract download links by quality, and resolve VidTube direct .mp4 URLs.
Pure ESM, plain JavaScript, no build step.
Install
npm install @gxaym1/animeQuick start
import Anime from "@gxaym1/anime";
// 1. Browse anime category (paginated)
const page1 = await Anime.browse({ page: 1 });
console.log(page1.results); // [{ title, url, thumbnail, quality, genre, rating }, ...]
console.log(page1.hasNext); // true/false
// 2. Search
const results = await Anime.search("dragon ball");
console.log(results.results);
// 3. Details of a post
const film = await Anime.details("https://topcinemaa.cam/film-slug/");
console.log(film.title, film.story, film.genres, film.year);
// 4. Download links (per quality + VidTube multi-quality link)
const dl = await Anime.downloadFromPost("https://topcinemaa.cam/film-slug/");
console.log(dl.vidtube); // "https://down.vidtube.one/d/XXXXX.html"
console.log(dl.byQuality); // { "1080p": [{ server:"UpDown", url:"..." }, ...] }
console.log(dl.all); // flat array
// 5. Resolve VidTube direct .mp4 links with quality labels
const vt = await Anime.vidtube(dl.vidtube);
console.log(vt.links); // [{ quality:"1080p", url:"https://...mp4", type:"video/mp4" }, ...]
// 6. All-in-one (details + download + vidtube) in one call
const full = await Anime.getAll("https://topcinemaa.cam/film-slug/");
console.log(full.details.title);
console.log(full.download.byQuality);
console.log(full.vidtube?.links);Named imports
import { browse, search, details, download, downloadFromPost, vidtubeLinks } from "@gxaym1/anime";Sub-path imports
import { browse } from "@gxaym1/anime/browse";
import { search } from "@gxaym1/anime/search";
import { details } from "@gxaym1/anime/details";
import { download, downloadFromPost } from "@gxaym1/anime/download";
import { vidtubeLinks } from "@gxaym1/anime/vidtube";API
browse(options?)
Browse the anime category: https://topcinemaa.cam/category/افلام-انمي-2/
| Option | Type | Default | |---|---|---| | page | number | 1 | | timeout | number | 30000 | | headers | object | — | | proxy | string | — |
Returns:
{ results: AnimeCard[], page: number, hasNext: boolean }search(query, options?)
Full-text search on topcinemaa.cam.
Returns:
{ query: string, results: AnimeCard[], page: number, hasNext: boolean }details(postUrl, options?)
Get full info from the anime post page.
Returns:
{
title: string,
url: string,
thumbnail?: string,
story?: string, // Arabic plot summary
quality?: string, // e.g. "1080p WEB-DL"
genres: string[],
year?: string,
duration?: string,
language?: string,
rating?: string,
watchUrl?: string, // /watch/ page
downloadUrl?: string // /download/ page
}download(downloadPageUrl, options?)
Scrape a /download/ page for all download links.
Returns:
{
vidtube?: string, // VidTube multi-quality URL
byQuality: Record<string, { server, url }[]>, // e.g. { "1080p": [...] }
all: { quality, server, url }[] // flat list
}downloadFromPost(postUrl, options?)
Same as download() but auto-appends /download/ to the post URL.
vidtubeLinks(vidtubeUrl, options?)
Resolve a VidTube URL into direct per-quality .mp4 links.
Accepts down.vidtube.one/d/ID.html or down.vidtube.one/embed-ID.html.
Returns:
{
sourceUrl: string,
downloadUrl?: string,
embedUrl?: string,
links: [{ quality: "1080p", url: "https://...mp4", type: "video/mp4" }, ...]
}getAll(postUrl, options?)
One-shot call that runs details + downloadFromPost + vidtubeLinks in sequence.
Returns:
{ details: AnimeDetails, download: DownloadResult, vidtube?: VidTubeResult }Data shapes
// AnimeCard (from browse/search)
{ title, url, thumbnail?, quality?, genre?, rating? }
// DownloadLink
{ server: "UpDown", url: "https://updown.cam/..." }
// VidTubeLink
{ quality: "1080p", url: "https://...mp4", type: "video/mp4" }License
MIT © gxaym1
