mirror of
https://github.com/Shineii86/AniKotoAPI.git
synced 2026-10-22 10:55:10 +00:00
feat: v2.5.1 — domain sync, spotlight fix, embed providers, info IDs, latest-episode checker, full docs pass
- Sync mirror domains with official hub (anikoto.site): replace dead
anikoto.se with official anikototv.se (dataUrl.js, render.yaml, README)
- Fix redesigned #hotest spotlight carousel selectors in homeInfo and
spotlight extractors (dual-selector fallback for old layout)
- New GET /api/stream/embeds: iframe-ready Megavid/AniXo/MegaPlay URLs
that bypass Cloudflare; ?slug= auto-resolves MAL/AniList IDs (cached),
or pass ?mal=/?anilist= directly with zero scraping
- GET /api/info now returns externalIds { animeId, malId, anilistId }
for direct feed into /api/stream/embeds (best-effort, 60min cache)
- New GET /api/episodes/latest?slug=: newest-episode checker for bot
polling — latest episode + counts only (10min cache), registered
before /episodes/:id so the literal path wins
- Top rankings ?sort=day|week|month verified already supported (docs)
- Full repo-style documentation on all new modules (box headers, FEATURE
markers, NOTE/TIP inline notes, JSDoc, footers)
- Diagnostic sweep: all counts synced to 40 endpoints / 30 handlers /
29 scrapers, stale badges and sample responses fixed, render.yaml EOF,
Dockerfile node:18-alpine (EOL) -> node:22-alpine
- Tests: 38 passed / 0 failed / 2 optional skips; 77 JS files syntax-OK
This commit is contained in:
+9
-9
@@ -7,7 +7,7 @@
|
||||
|
||||

|
||||

|
||||

|
||||

|
||||

|
||||
|
||||
> A fast, free REST API that scrapes anime data from **anikototv.to**.
|
||||
@@ -70,9 +70,9 @@ That's it. No API keys required.
|
||||
|
||||
| Feature | Description |
|
||||
|---|---|
|
||||
| **38+ Endpoints** | Full coverage of anime data, streaming, and discovery |
|
||||
| **28 HTML Scrapers** | Cheerio-based scrapers for robust data extraction |
|
||||
| **28 Route Handlers** | Organized controllers with clean separation of concerns |
|
||||
| **40+ Endpoints** | Full coverage of anime data, streaming, and discovery |
|
||||
| **29 HTML Scrapers** | Cheerio-based scrapers for robust data extraction |
|
||||
| **30 Route Handlers** | Organized controllers with clean separation of concerns |
|
||||
| **5 Mirror Domains** | Automatic failover across multiple source domains |
|
||||
| **LRU Cache** | Per-endpoint TTL caching for performance |
|
||||
| **Rate Limiting** | 100 requests per 15 minutes per IP |
|
||||
@@ -194,12 +194,12 @@ AniKotoAPI/
|
||||
│ ├── info.js # Anime info
|
||||
│ ├── search.js # Search
|
||||
│ ├── stream.js # Streaming
|
||||
│ └── ... # 38+ route handlers
|
||||
│ └── ... # 40 route handlers
|
||||
├── scrapers/ # Cheerio HTML scrapers
|
||||
│ ├── home.js
|
||||
│ ├── info.js
|
||||
│ ├── search.js
|
||||
│ └── ... # 28 scrapers
|
||||
│ └── ... # 29 scrapers
|
||||
├── utils/ # Shared utilities
|
||||
│ ├── cache.js # LRU cache with TTL
|
||||
│ ├── rateLimit.js # IP-based rate limiter
|
||||
@@ -218,8 +218,8 @@ AniKotoAPI/
|
||||
|
||||
### Key Design Patterns
|
||||
|
||||
- **Scraping Layer**: 28 Cheerio-based scrapers parse HTML from anikototv.to, isolating page-specific logic from route handlers.
|
||||
- **Controller Layer**: 28 route handlers map HTTP requests to scraper calls, handle validation, and format responses.
|
||||
- **Scraping Layer**: 29 Cheerio-based scrapers parse HTML from anikototv.to, isolating page-specific logic from route handlers.
|
||||
- **Controller Layer**: 30 route handlers map HTTP requests to scraper calls, handle validation, and format responses.
|
||||
- **Cache Layer**: LRU cache with per-endpoint TTL reduces redundant scraping. Hot endpoints cache for 2–5 minutes; cold endpoints for 10+ minutes.
|
||||
- **Mirror Layer**: 5 source domains with automatic failover. If one domain is slow or down, requests transparently fall back to the next mirror.
|
||||
- **Rate Limiter**: Token bucket algorithm, 100 requests per 15-minute window per client IP.
|
||||
@@ -350,7 +350,7 @@ All errors return JSON with a consistent structure:
|
||||
|
||||
| File | Description |
|
||||
|------|-------------|
|
||||
| [endpoints.md](./endpoints.md) | Full API reference for all 38+ endpoints |
|
||||
| [endpoints.md](./endpoints.md) | Full API reference for all 40+ endpoints |
|
||||
| [streaming.md](./streaming.md) | Complete streaming workflow guide |
|
||||
| [examples.md](./examples.md) | Working code examples in cURL, JS, Python |
|
||||
| [architecture.md](./architecture.md) | Project structure and design patterns |
|
||||
|
||||
Reference in New Issue
Block a user