{"id":49345299,"url":"https://github.com/fernandomema/stremio-web-sources","last_synced_at":"2026-04-27T07:02:02.264Z","repository":{"id":347461156,"uuid":"1194124924","full_name":"fernandomema/stremio-web-sources","owner":"fernandomema","description":null,"archived":false,"fork":false,"pushed_at":"2026-03-28T01:44:37.000Z","size":49,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-28T07:40:43.034Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fernandomema.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2026-03-28T00:24:08.000Z","updated_at":"2026-03-28T01:44:40.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/fernandomema/stremio-web-sources","commit_stats":null,"previous_names":["fernandomema/stremio-web-sources"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/fernandomema/stremio-web-sources","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fernandomema%2Fstremio-web-sources","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fernandomema%2Fstremio-web-sources/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fernandomema%2Fstremio-web-sources/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fernandomema%2Fstremio-web-sources/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fernandomema","download_url":"https://codeload.github.com/fernandomema/stremio-web-sources/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fernandomema%2Fstremio-web-sources/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32326122,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-26T23:26:28.701Z","status":"online","status_checked_at":"2026-04-27T02:00:06.769Z","response_time":128,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-04-27T07:02:00.731Z","updated_at":"2026-04-27T07:02:02.238Z","avatar_url":"https://github.com/fernandomema.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Stremio Web Sources\n\nAddon modular de Stremio que gestiona múltiples fuentes de vídeo bajo un mismo servidor. Sistema pluggable donde cada fuente (source) comparte infraestructura común: HTTP client con cookies, caché, resolución de dominios proxy, y parsing.\n\n## Arquitectura\n\n```\nsrc/\n├── index.js                    # Servidor Express + rutas Stremio\n├── core/\n│   ├── base-source.js          # Clase base para todos los sources\n│   ├── source-manager.js       # Orquestador multi-source\n│   ├── manifest.js             # Generador de manifest combinado\n│   ├── http-client.js          # HTTP client con cookies, CSRF, redirects\n│   ├── cache.js                # Caché en memoria con TTL\n│   ├── domain-resolver.js      # Resolución de dominios proxy (enlaces.ly)\n│   └── logger.js               # Logger\n└── sources/\n    └── seriesly/               # Source: Series.ly\n        ├── index.js            # Entry point del source\n        ├── auth.js             # Autenticación (login con CSRF)\n        ├── api.js              # Cliente API (search, catalog, filters)\n        └── parser.js           # Parser HTML/JSON → formato Stremio\n```\n\n## Cómo funciona\n\n1. **Resolución de dominio**: Al iniciar, el `DomainResolver` genera un subdominio proxy usando el algoritmo de [enlaces.ly](https://enlaces.ly) (hash BIP39 de la IP del servidor) y verifica disponibilidad contra los mirrors (`enlace.ly`, `xokas.org`).\n\n2. **Autenticación**: Si se configuran credenciales, el source se autentica via POST al formulario de login con CSRF token, manteniendo la sesión via cookies.\n\n3. **API**: Todas las llamadas al API de series.ly son POST con JSON body y requieren CSRF token + cookies de sesión:\n   - `/api/search/posts` — Búsqueda\n   - `/api/posts/list` — Listado con filtros (tipo, género, calidad, idioma, año)\n   - `/api/home/posts/batch` — Contenido home\n   - `/api/posts/filters` — Filtros disponibles\n\n4. **Streams**: Los enlaces de vídeo se extraen del HTML de la página de detalle (renderizado por Livewire) y se resuelven individualmente.\n\n## Setup\n\n```bash\nnpm install\ncp .env.example .env\n# Editar .env con credenciales de Series.ly\nnpm start\n```\n\nEl addon estará en `http://localhost:7000/manifest.json` — se puede instalar en Stremio.\n\n## Credenciales\n\nSe necesita una cuenta de Series.ly. Configura en `.env`:\n\n```\nSERIESLY_EMAIL=tu@email.com\nSERIESLY_PASSWORD=tupassword\n```\n\n## Añadir nuevas fuentes\n\nCrear un nuevo directorio en `src/sources/` con un módulo que extienda `BaseSource`:\n\n```js\nconst { BaseSource } = require('../../core/base-source');\n\nclass MiSource extends BaseSource {\n    constructor() {\n        super({\n            id: 'mi-source',\n            name: 'Mi Source',\n            types: ['movie', 'series'],\n            idPrefixes: ['ms:'],\n            catalogs: [{ id: 'mi-catalog', type: 'movie', name: 'Mi Catálogo' }],\n        });\n    }\n\n    async init() { /* setup */ }\n    async getCatalog(type, catalogId, extra) { return []; }\n    async getMeta(type, id) { return null; }\n    async getStreams(type, id) { return []; }\n}\n\nmodule.exports = MiSource;\n```\n\nLuego registrarlo en `src/index.js`:\n\n```js\nconst MiSource = require('./sources/mi-source');\nsourceManager.register(new MiSource());\n```\n\n## Notas técnicas\n\n- Las peticiones HTTP usan el módulo nativo `https`/`http` (sin dependencias extra tipo axios) para minimizar peso\n- El parser usa Cheerio para el HTML estático; no se usa Playwright/Puppeteer en runtime\n- Playwright solo se usa como dev dependency para los scripts de análisis en `scripts/`\n- La caché en memoria tiene TTL configurable por tipo de dato\n- El sistema de cookies del HttpClient gestiona automáticamente sesiones multi-dominio\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffernandomema%2Fstremio-web-sources","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffernandomema%2Fstremio-web-sources","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffernandomema%2Fstremio-web-sources/lists"}