uni_scrapper
Version:
A Collection of Movies, Series, Animes Scrapper.
64 lines (41 loc) âĸ 1.86 kB
Markdown
# UniScrapper
**UniScrapper** is a modular, scalable scraper framework and backend API built with TypeScript. It allows scraping metadata, search results, and streaming links for movies and TV shows from various content sources â usable as a standalone API server or an NPM package.
> **Note:** Currently supports the source: `XPrime`. More sources will be added soon.
## đ Features
- đ Unified media search & metadata fetch
- đī¸ Streaming link extraction from public sources
- đ§Š Modular source architecture for easy expansion
- ⥠In-memory caching with `node-cache`
- đĻ Can be used as both an HTTP API and an NPM module
- đ§ Built with TypeScript
## đĻ NPM Package Usage
### đĨ Installation
```bash
npm install uni_scrapper
````
### đ Example Usage
```ts
import UniScrapper from "uni_scrapper";
const scrapper = new UniScrapper();
(async () => {
const results = await scrapper.search("Attack on Titan");
const details = await scrapper.getDetails(results[0].id);
const episodeId = details.seasons[0].episodes[0].id;
const streams = await scrapper.getStreams(episodeId);
console.log(streams);
})();
```
### â
Available Methods
| Method | Description |
| ----------------------- | -------------------------------------------------- |
| `search(query: string)` | Search movies/TV using TMDB |
| `getDetails(id)` | Get metadata for a selected media item |
| `getStreams(episodeId)` | Get streaming links for an episode (requires `id`) |
> âšī¸ For shows, use:
> `details.seasons[0].episodes[0].id`
> to fetch a valid episode ID to pass into `getStreams`.
## đ License
This project is licensed under the [MIT License](LICENSE).