diff --git a/videoclub/.env.example b/videoclub/.env.example new file mode 100644 index 0000000..32713a8 --- /dev/null +++ b/videoclub/.env.example @@ -0,0 +1,22 @@ +# Token RealDebrid usado por el addon Torrentio de Stremio. +# Se encuentra en la URL del addon: .../realdebrid=/... +# El token NO se sube al repositorio (ver .gitignore). +TORRENTIO_RD_TOKEN= + +# Prefijo de la URL del catalogo Torrentio (sin token). +# Formato: language=spanish|realdebrid= +TORRENTIO_CONFIG=language=spanish + +# Hora de la programacion diaria (Task Scheduler) +# (no es una variable de configuracion, solo referencia) + +# IMPORTANTE: la notificacion se envia SOLO al canal IDD de Telegram +# via scripts/idd_channel.py de biblioteca_negocio_prolongo +# (bot API, canal -1003967773087). No usa sesion personal de telethon. + +# NAS Synology Download Station (descargas con --descargar) +NAS_HOST=192.168.50.31 +NAS_PORT=5000 +NAS_USER= +NAS_PASS= +NAS_HTTPS=0 diff --git a/videoclub/config.py b/videoclub/config.py new file mode 100644 index 0000000..424cd73 --- /dev/null +++ b/videoclub/config.py @@ -0,0 +1,19 @@ +import os +from pathlib import Path + +from dotenv import load_dotenv + +load_dotenv(Path(__file__).resolve().parent / ".env") + +TORRENTIO_RD_TOKEN = os.getenv("TORRENTIO_RD_TOKEN", "").strip() +TORRENTIO_CONFIG = os.getenv("TORRENTIO_CONFIG", "language=spanish").strip() + +if TORRENTIO_RD_TOKEN: + TORRENTIO_CONFIG_WITH_TOKEN = f"{TORRENTIO_CONFIG}|realdebrid={TORRENTIO_RD_TOKEN}" +else: + TORRENTIO_CONFIG_WITH_TOKEN = TORRENTIO_CONFIG + +# Notificaciones SOLO al canal IDD de Telegram (via idd_channel.py del repo negocio) +REPO_NEGOCIO_SCRIPTS = Path( + r"C:\Users\juanm\Documents\GitHub\biblioteca_negocio_prolongo\scripts" +) diff --git a/videoclub/listados/2026-08-03.md b/videoclub/listados/2026-08-03.md new file mode 100644 index 0000000..a824f84 --- /dev/null +++ b/videoclub/listados/2026-08-03.md @@ -0,0 +1,213 @@ +# Videoclub — 2026-08-03 + +**Total disponibles: 99** | Novedades: 99 + +## Novedades (99) + +- 🎬 Downloads `Downloads` +- 🎬 Obsession Castellano-Ingles+Subt Castellano-Ingles H264 E-AC3 5 1 BD-Rip hd 1080p `Obsession Castellano-Ingles+Subt Castellano-Ingles H264 E-AC` +- 🎬 Scary Movie (2026) `Scary Movie (2026) [4k 2160p][Esp].mkv` +- 📺 Star Trek Strange New Worlds `Star Trek Strange New Worlds [HDTV 1080p][Cap.401].mkv` +- 🎬 He-Man y los Masters del Universo (2026) `He-Man y los Masters del Universo (2026) [Bluray 1080p][Esp]` +- 📺 Supergirl (2026) `Supergirl (2026) [Bluray 1080p][Esp].mkv` +- 🎬 El dia de la revelacion Disclosure Day (2026) `El dia de la revelacion (Disclosure Day) (2026) [Bluray 1080` +- 🎬 El día de la revelacion Disclosure Day (2026) `El día de la revelacion (Disclosure Day) (2026) [4k 2160p][E` +- 🎬 El Pasajero Nocturno (2026) `El Pasajero Nocturno (2026) [Bluray 1080p][Esp].mkv` +- 🎬 El Pasajero Nocturno (2026) `El Pasajero Nocturno (2026) [Bluray][Esp].avi` +- 🎬 Disclosure Day NO-ADS 1080p x265 MD-AAC5 1+2 0 ITA-ENG MmTRaXx DD-CREW-IlCosaro (2026) `Disclosure.Day.(2026).(NO-ADS).1080p.x265.MD-AAC5.1+2.0.ITA-` +- 🎬 Disclosure Day 1080p ViruseProject (2026) `Disclosure.Day.2026.1080p.CAMRip.ViruseProject.mkv` +- 🎬 Obsession 2160p UHD x265 10bit DV HDR r00t (2026) `Obsession (2026) (2160p UHD BluRay x265 10bit DV HDR r00t).m` +- 🎬 Obsession 2160p UHD x265 10bit DV HDR TrueHD Atmos 7 1 r00t (2026) `Obsession (2026) (2160p UHD BluRay x265 10bit DV HDR TrueHD ` +- 🎬 Backrooms 2160p 4K WEB x265 10bit AAC5 1 (2026) `Backrooms.2026.2160p.4K.WEB.x265.10bit.AAC5.1-[YTS.GG - YTS.` +- 🎬 Luger (2026) `Luger (2026) [Bluray 720p][Esp].mkv` +- 🎬 Spider-Man No Way Home 4Kremux2160 atomixhq link `Spider-Man No Way Home 4Kremux2160.atomixhq.link.mkv` +- 🎬 Iron Lung 2026 1080p `Iron Lung 2026 1080p.mkv` +- 📺 From - S02E01 - Strangers in a Strange Land - WEBDL-1080p - Spanish 2x01 - audio - sub `From - S02E01 - Strangers in a Strange Land - WEBDL-1080p - ` +- 🎬 La maldicion de Shelby Oaks (2026) `La maldicion de Shelby Oaks (2026) [4k 2160p][Esp].mkv` +- 🎬 Steven Spielberg el rey midas de Hollywood wolfmax4k com (2024) `Steven Spielberg el rey midas de Hollywood (2024) [HDTV 1080` +- 🎬 Fiasco total La tragedia del festival Astroworld (2025) `Fiasco total La tragedia del festival Astroworld (2025) [HDT` +- 🎬 Fiasco total La tragedia del festival Astroworld (2025) `Fiasco total La tragedia del festival Astroworld (2025) [HDT` +- 🎬 Fiasco total La tragedia del festival Astroworld (2025) `Fiasco total La tragedia del festival Astroworld (2025) [HDT` +- 🎬 La momia de Lee Cronin Castellano-Ingles+Subt Castellano-Ingles H264 E-AC3 5 1 BD-Rip hd 1080p `La momia de Lee Cronin Castellano-Ingles+Subt Castellano-Ing` +- 🎬 super mario galaxy la película Castellano-Ingles+Subt Castellano-Ingles H264 E-AC3 5 1 BD-Rip hd 1080p `super mario galaxy la película Castellano-Ingles+Subt Castel` +- 🎬 Super Mario Galaxy La película (2026) `Super Mario Galaxy La película (2026) [4k 2160p][Esp].mkv` +- 🎬 Salvacion (2026) `Proyecto Salvacion (2026) [Bluray 1080p][Esp].mkv` +- 📺 Heidi Girl of the Alps Alps no Shoujo Heidi Season 1 BD 1080p HEVC x265 10bit Eng-Subs -Judas `Heidi Girl of the Alps (Alps no Shoujo Heidi) (Season 1) (BD` +- 🎬 Greenland El Ultimo Refugio (2020) `Greenland El Ultimo Refugio (2020) [BluRay Rip][AC3 5.1 Cast` +- 🎬 Greenland `Greenland [4K UHDremux][2160p][HDR10][AC3 5.1 Castellano-Tru` +- 🎬 Greenland 2 `Greenland 2 [4k 2160p][Esp].mkv` +- 🎬 Resident Evil `Resident Evil [FullUHD 2160p][Castellano AC3 5.1-Ingles Dolb` +- 🎬 Salvacion (2026) `Proyecto Salvacion (2026) [4k 2160p][Esp].mkv` +- 🎬 Project Hail Mary 2160p KinoRip h265 En Es Dual YG (2026) `Project.Hail.Mary.2026.2160p.KinoRip.h265.En.Es.Dual YG.mkv` +- 🎬 Project Hail Mary 2160p KinoRip h265 En Es Dual YG (2026) `Project.Hail.Mary.2026.2160p.KinoRip.h265.En.Es.Dual YG.mkv` +- 🎬 Project Hail Mary 2160p KinoRip h265 En Es Dual YG (2026) `Project.Hail.Mary.2026.2160p.KinoRip.h265.En.Es.Dual YG.mkv` +- 🎬 Twilight Saga 2008-2012 2160p H265 HDR10 AC3 5 1 ITA ENG sub ita eng Sp33dy94-MIRCrew `Twilight Saga (2008-2012) 2160p H265 HDR10 AC3 5.1 ITA.ENG s` +- 📺 Monarch El Legado De Los Monstruos wolfmax4k com `Monarch El Legado De Los Monstruos [4k 2160p][Cap.101](wolfm` +- 📺 Stargate Sg-1 05x12 Agujero X-Tremo `Stargate_Sg-1_05x12_Agujero_X-Tremo.avi` +- 🎬 TheAdventuresOfTomSawyer `TheAdventuresOfTomSawyer` +- 📺 The Studio `The Studio [HDTV 1080p][Cap.105]` +- 📺 Stargate Sg-1 05x10 2001 `Stargate_Sg-1_05x10_2001.avi` +- 📺 The Studio `The Studio [HDTV 1080p][Cap.104]` +- 📺 The Studio `The Studio [HDTV 1080p][Cap.103]` +- 📺 The Studio wolfmax4k com `The Studio [HDTV 1080p][cap.102](wolfmax4k.com).mkv` +- 📺 Euphoria `Euphoria [4k 2160p][Cap.302].mkv` +- 📺 Stargate Sg-1 05x09 Entre Dos Fuegos `Stargate_Sg-1_05x09_Entre_Dos_Fuegos.avi` +- 📺 Stargate Sg-1 05x08 La Tumba `Stargate_Sg-1_05x08_La_Tumba.avi` +- 📺 Stargate Sg-1 05x07 Bestias De Carga `Stargate_Sg-1_05x07_Bestias_De_Carga.avi` +- 📺 Euphoria `Euphoria [4k 2160p][Cap.301].mkv` +- 🎬 The Strangers Chapter 3 (2026) `The.Strangers.Chapter.3.2026.REMUX.mkv` +- 🎬 Undertone TS 1080p (2025) `Undertone.2025.TS.1080p.mkv` +- 🎬 Send Help (2026) `Send Help (2026) [1080p][Castellano][VerPeliculasOnline.org]` +- 🎬 Project Hail Mary HDTS YG `Project Hail Mary [2026] HDTS YG` +- 🎬 Project Hail Mary HDTS YG `Project Hail Mary [2026] HDTS YG` +- 🎬 Antes Del Fin Del Mundo 1080P-Dual-Lat (2025) `Antes.Del.Fin.Del.Mundo.2025.1080P-Dual-Lat.mkv` +- 🎬 Scream 7 (2026) `Scream 7 (2026) [4k 2160p][Esp].mkv` +- 📺 The Pitt `The Pitt [4k 2160p][Cap.208].mkv` +- 🎬 Cold Storage CZtit 1080p (2026) `Cold.Storage (2026) CZtit 1080p.mkv` +- 🎬 Project Hail Mary 1080p HC x264-SyncUP (2026) `Project.Hail.Mary.2026.1080p.TELESYNC.HC.x264-SyncUP` +- 🎬 Project Hail Mary HDTS Clean Audios - 1080p - x264 - - AAC - 2 9GB (2026) `Project Hail Mary (2026) HDTS Clean Audios - 1080p - x264 - ` +- 📺 Heidi Girl of the Alps 01-52 Complete RO EN - subs only `[Aventurierii SpaÅ£iului] [Silver Zero Subs] Heidi Girl of t` +- 📺 Heidi Girl of the Alps 01-52 Complete RO EN - subs only `[Aventurierii SpaÅ£iului] [Silver Zero Subs] Heidi Girl of t` +- 📺 Heidi Girl of the Alps - TV + SP `[Moozzi2] Heidi Girl of the Alps - TV + SP` +- 📺 Heidi Girl of the Alps - TV + SP `[Moozzi2] Heidi Girl of the Alps - TV + SP` +- 📺 Heidi Serie Completa 1080p H265 AC3 2 0 ITA Sp33dy94-MIRCrew (1974) `Heidi Serie Completa (1974) 1080p H265 AC3 2.0 ITA Sp33dy94-` +- 🎬 Cold Storage 2160p SDR (2026) `Cold.Storage.2026.2160p.SDR.mkv` +- 📺 Star Trek Starfleet Academy S01E10 2160p WEB h265-ETHEL `Star.Trek.Starfleet.Academy.S01E10.2160p.WEB.h265-ETHEL.mkv` +- 📺 Paradise wolfmax4k com `Paradise [4k 2160p][Cap.101](wolfmax4k.com).mkv` +- 🎬 Good Luck Have Fun Dont Die 2025 `Good Luck Have Fun Dont Die 2025.mkv` +- 📺 Detective Conan - 0001 ~ 0123 `[Erai-raws] Detective Conan - 0001 ~ 0123 [1080p][Multiple S` +- 📺 Star Trek Starfleet Academy S01e01-10 1080p Ita Eng Spa h265 10bit SubS byMe7alh `Star Trek Starfleet Academy S01e01-10 (1080p Ita Eng Spa h26` +- 📺 The Pitt `The Pitt [4k 2160p][Cap.207].mkv` +- 📺 Star Trek Starfleet Academy S01e09 Ita Eng Spa 1080p h265 10bit SubS-Me7alh `Star.Trek.Starfleet.Academy.S01e09.Ita.Eng.Spa.1080p.h265.10` +- 📺 Star Trek Starfleet Academy S01E09 1080p AV1 10bit-MeGusta `Star.Trek.Starfleet.Academy.S01E09.1080p.AV1.10bit-MeGusta.m` +- 🔞 Private 26 02 19 Layla Scarlett XXX 720p HEVC x265 PRT `Private.26.02.19.Layla.Scarlett.XXX.720p.HEVC.x265.PRT` +- 🔞 Private 26 02 19 Layla Scarlett XXX 1080p HEVC x265 PRT `Private.26.02.19.Layla.Scarlett.XXX.1080p.HEVC.x265.PRT` +- 🔞 SexAndSubmission 26 02 27 Hazel Heart XXX 1080p HEVC x265 PRT `SexAndSubmission.26.02.27.Hazel.Heart.XXX.1080p.HEVC.x265.PR` +- 🎬 Sin piedad Mercy (2026) `Sin piedad (Mercy) (2026) [4k 2160p][Esp].mkv` +- 📺 Star Trek Starfleet Academy S01e07 Ita Eng Spa 1080p h265 10bit SubS-Me7alh `Star.Trek.Starfleet.Academy.S01e07.Ita.Eng.Spa.1080p.h265.10` +- 🎬 Zootropolis 2 (2025) `Zootropolis 2 (2025) [4k 2160p][Esp].mkv` +- 🔞 TheLifeErotic 26 02 15 Megan Love Lounge And Lure 2 XXX 1080p HEVC x265 PRT `TheLifeErotic.26.02.15.Megan.Love.Lounge.And.Lure.2.XXX.1080` +- 🔞 OnlyTarts 26 02 12 Lula Stocch For Onlytarts XXX 720p HEVC x265 PRT `OnlyTarts.26.02.12.Lula.Stocch.For.Onlytarts.XXX.720p.HEVC.x` +- 🔞 Private 25 10 25 Calita Fire XXX 1080p HEVC x265 PRT `Private.25.10.25.Calita.Fire.XXX.1080p.HEVC.x265.PRT` +- 🔞 EvilAngel 25 11 18 Molly Smith XXX 1080p HEVC x265 PRT `EvilAngel.25.11.18.Molly.Smith.XXX.1080p.HEVC.x265.PRT` +- 🔞 MonstersOfCock 26 02 15 Sooky Sin XXX 1080p HEVC x265 PRT `MonstersOfCock.26.02.15.Sooky.Sin.XXX.1080p.HEVC.x265.PRT` +- 🔞 MonstersOfCock 26 02 15 Sooky Sin XXX 720p HEVC x265 PRT `MonstersOfCock.26.02.15.Sooky.Sin.XXX.720p.HEVC.x265.PRT` +- 🔞 BrazzersExxtra 26 02 15 Jadynn Stone And Archer Ali Lesbian Loses Her Gold Star XXX 1080p HEVC x265 PRT `BrazzersExxtra.26.02.15.Jadynn.Stone.And.Archer.Ali.Lesbian.` +- 🔞 BrazzersExxtra 26 02 15 Jadynn Stone And Archer Ali Lesbian Loses Her Gold Star XXX 720p HEVC x265 PRT `BrazzersExxtra.26.02.15.Jadynn.Stone.And.Archer.Ali.Lesbian.` +- 📺 Heidi Girl of the Alps Alps no Shoujo Heidi Season 1 BD 1080p HEVC x265 10bit Eng-Subs -Judas `Heidi Girl of the Alps (Alps no Shoujo Heidi) (Season 1) (BD` +- 📺 The Pitt `The Pitt [HDTV 720p][Cap.206].mkv` +- 📺 The Pitt `The Pitt [4k 2160p][Cap.205].mkv` +- 📺 The Pitt `The Pitt [4k 2160p][Cap.204].mkv` +- 📺 The Pitt `The Pitt [4k 2160p][Cap.203].mkv` +- 📺 Desaparecida `Desaparecida [HDTV 1080p][Cap.102].mkv` +- 📺 Vanished `Vanished [HDTV 1080p][Cap.101].mkv` +- 🔞 ItsAnal 25 11 01 Ravyn Alexa Ravyns First DP XXX 1080p HEVC x265 PRT `ItsAnal.25.11.01.Ravyn.Alexa.Ravyns.First.DP.XXX.1080p.HEVC.` +- 🔞 ItsAnal 25 11 01 Ravyn Alexa Ravyns First DP XXX 720p HEVC x265 PRT `ItsAnal.25.11.01.Ravyn.Alexa.Ravyns.First.DP.XXX.720p.HEVC.x` + +## Películas (49) + +- Antes Del Fin Del Mundo 1080P-Dual-Lat (2025) +- Backrooms 2160p 4K WEB x265 10bit AAC5 1 (2026) +- Cold Storage 2160p SDR (2026) +- Cold Storage CZtit 1080p (2026) +- Disclosure Day 1080p ViruseProject (2026) +- Disclosure Day NO-ADS 1080p x265 MD-AAC5 1+2 0 ITA-ENG MmTRaXx DD-CREW-IlCosaro (2026) +- Downloads +- El dia de la revelacion Disclosure Day (2026) +- El día de la revelacion Disclosure Day (2026) +- El Pasajero Nocturno (2026) +- El Pasajero Nocturno (2026) +- Fiasco total La tragedia del festival Astroworld (2025) +- Fiasco total La tragedia del festival Astroworld (2025) +- Fiasco total La tragedia del festival Astroworld (2025) +- Good Luck Have Fun Dont Die 2025 +- Greenland +- Greenland 2 +- Greenland El Ultimo Refugio (2020) +- He-Man y los Masters del Universo (2026) +- Iron Lung 2026 1080p +- La maldicion de Shelby Oaks (2026) +- La momia de Lee Cronin Castellano-Ingles+Subt Castellano-Ingles H264 E-AC3 5 1 BD-Rip hd 1080p +- Luger (2026) +- Obsession 2160p UHD x265 10bit DV HDR r00t (2026) +- Obsession 2160p UHD x265 10bit DV HDR TrueHD Atmos 7 1 r00t (2026) +- Obsession Castellano-Ingles+Subt Castellano-Ingles H264 E-AC3 5 1 BD-Rip hd 1080p +- Project Hail Mary 1080p HC x264-SyncUP (2026) +- Project Hail Mary 2160p KinoRip h265 En Es Dual YG (2026) +- Project Hail Mary 2160p KinoRip h265 En Es Dual YG (2026) +- Project Hail Mary 2160p KinoRip h265 En Es Dual YG (2026) +- Project Hail Mary HDTS Clean Audios - 1080p - x264 - - AAC - 2 9GB (2026) +- Project Hail Mary HDTS YG +- Project Hail Mary HDTS YG +- Resident Evil +- Salvacion (2026) +- Salvacion (2026) +- Scary Movie (2026) +- Scream 7 (2026) +- Send Help (2026) +- Sin piedad Mercy (2026) +- Spider-Man No Way Home 4Kremux2160 atomixhq link +- Steven Spielberg el rey midas de Hollywood wolfmax4k com (2024) +- Super Mario Galaxy La película (2026) +- super mario galaxy la película Castellano-Ingles+Subt Castellano-Ingles H264 E-AC3 5 1 BD-Rip hd 1080p +- The Strangers Chapter 3 (2026) +- TheAdventuresOfTomSawyer +- Twilight Saga 2008-2012 2160p H265 HDR10 AC3 5 1 ITA ENG sub ita eng Sp33dy94-MIRCrew +- Undertone TS 1080p (2025) +- Zootropolis 2 (2025) + +## Series (37) + +- Desaparecida +- Detective Conan - 0001 ~ 0123 +- Euphoria +- Euphoria +- From - S02E01 - Strangers in a Strange Land - WEBDL-1080p - Spanish 2x01 - audio - sub +- Heidi Girl of the Alps - TV + SP +- Heidi Girl of the Alps - TV + SP +- Heidi Girl of the Alps 01-52 Complete RO EN - subs only +- Heidi Girl of the Alps 01-52 Complete RO EN - subs only +- Heidi Girl of the Alps Alps no Shoujo Heidi Season 1 BD 1080p HEVC x265 10bit Eng-Subs -Judas +- Heidi Girl of the Alps Alps no Shoujo Heidi Season 1 BD 1080p HEVC x265 10bit Eng-Subs -Judas +- Heidi Serie Completa 1080p H265 AC3 2 0 ITA Sp33dy94-MIRCrew (1974) +- Monarch El Legado De Los Monstruos wolfmax4k com +- Paradise wolfmax4k com +- Star Trek Starfleet Academy S01e01-10 1080p Ita Eng Spa h265 10bit SubS byMe7alh +- Star Trek Starfleet Academy S01e07 Ita Eng Spa 1080p h265 10bit SubS-Me7alh +- Star Trek Starfleet Academy S01E09 1080p AV1 10bit-MeGusta +- Star Trek Starfleet Academy S01e09 Ita Eng Spa 1080p h265 10bit SubS-Me7alh +- Star Trek Starfleet Academy S01E10 2160p WEB h265-ETHEL +- Star Trek Strange New Worlds +- Stargate Sg-1 05x07 Bestias De Carga +- Stargate Sg-1 05x08 La Tumba +- Stargate Sg-1 05x09 Entre Dos Fuegos +- Stargate Sg-1 05x10 2001 +- Stargate Sg-1 05x12 Agujero X-Tremo +- Supergirl (2026) +- The Pitt +- The Pitt +- The Pitt +- The Pitt +- The Pitt +- The Pitt +- The Studio +- The Studio +- The Studio +- The Studio wolfmax4k com +- Vanished + +## Adulto (13) + +- BrazzersExxtra 26 02 15 Jadynn Stone And Archer Ali Lesbian Loses Her Gold Star XXX 1080p HEVC x265 PRT +- BrazzersExxtra 26 02 15 Jadynn Stone And Archer Ali Lesbian Loses Her Gold Star XXX 720p HEVC x265 PRT +- EvilAngel 25 11 18 Molly Smith XXX 1080p HEVC x265 PRT +- ItsAnal 25 11 01 Ravyn Alexa Ravyns First DP XXX 1080p HEVC x265 PRT +- ItsAnal 25 11 01 Ravyn Alexa Ravyns First DP XXX 720p HEVC x265 PRT +- MonstersOfCock 26 02 15 Sooky Sin XXX 1080p HEVC x265 PRT +- MonstersOfCock 26 02 15 Sooky Sin XXX 720p HEVC x265 PRT +- OnlyTarts 26 02 12 Lula Stocch For Onlytarts XXX 720p HEVC x265 PRT +- Private 25 10 25 Calita Fire XXX 1080p HEVC x265 PRT +- Private 26 02 19 Layla Scarlett XXX 1080p HEVC x265 PRT +- Private 26 02 19 Layla Scarlett XXX 720p HEVC x265 PRT +- SexAndSubmission 26 02 27 Hazel Heart XXX 1080p HEVC x265 PRT +- TheLifeErotic 26 02 15 Megan Love Lounge And Lure 2 XXX 1080p HEVC x265 PRT diff --git a/videoclub/nas_dl.py b/videoclub/nas_dl.py new file mode 100644 index 0000000..1727b33 --- /dev/null +++ b/videoclub/nas_dl.py @@ -0,0 +1,86 @@ +""" +nas_dl.py — Anade descargas al NAS Synology via API de Download Station. + +Login: POST /webapi/auth.cgi (SYNO.API.Auth, version 6, session DownloadStation) +Crear: POST /webapi/DownloadStation/task.cgi (SYNO.DownloadStation.Task, create) + +La URI puede ser un enlace HTTP directo (p. ej. enlace de RealDebrid), +un magnet o una URL de fichero .torrent. +""" +import json +import os +import sys +import urllib.parse +import urllib.request +from pathlib import Path + +from dotenv import load_dotenv + +load_dotenv(Path(__file__).resolve().parent / ".env") + +NAS_HOST = os.getenv("NAS_HOST", "192.168.50.31").strip().rstrip("/") +NAS_PORT = os.getenv("NAS_PORT", "5000").strip() +NAS_USER = os.getenv("NAS_USER", "").strip() +NAS_PASS = os.getenv("NAS_PASS", "").strip() +NAS_HTTPS = os.getenv("NAS_HTTPS", "0").strip() == "1" + +BASE = f"{'https' if NAS_HTTPS else 'http'}://{NAS_HOST}:{NAS_PORT}" + + +def _api(path, params, session=None): + data = urllib.parse.urlencode(params).encode() + headers = {"Content-Type": "application/x-www-form-urlencoded"} + if session: + headers["Cookie"] = session + req = urllib.request.Request(f"{BASE}{path}", data=data, headers=headers) + with urllib.request.urlopen(req, timeout=20) as r: + return json.loads(r.read().decode()) + + +def login(): + """Devuelve la cookie de sesion DownloadStation o None.""" + if not NAS_USER or not NAS_PASS: + print("[NAS] Faltan NAS_USER/NAS_PASS en .env") + return None + r = _api("/webapi/auth.cgi", { + "api": "SYNO.API.Auth", + "version": "6", + "method": "login", + "account": NAS_USER, + "passwd": NAS_PASS, + "session": "DownloadStation", + "format": "cookie", + }) + if r.get("success"): + # la cookie viene en Set-Cookie; la reconstruimos con el sid devuelto + sid = r.get("data", {}).get("sid") + return f"sid={sid}" if sid else None + print(f"[NAS] Login fallido: {r.get('error')}") + return None + + +def add_torrent(uri, session=None): + """Anade una URI (http/magnet/.torrent) a Download Station.""" + if not session: + session = login() + if not session: + return False + r = _api("/webapi/DownloadStation/task.cgi", { + "api": "SYNO.DownloadStation.Task", + "version": "3", + "method": "create", + "uri": uri, + }, session=session) + if r.get("success"): + print(f"[NAS] Tarea anadida: {uri[:80]}") + return True + print(f"[NAS] Error al anadir tarea: {r.get('error')}") + return False + + +if __name__ == "__main__": + if len(sys.argv) < 2: + print("Uso: python nas_dl.py ") + sys.exit(1) + ok = add_torrent(sys.argv[1]) + sys.exit(0 if ok else 1) diff --git a/videoclub/snapshots/2026-08-03.json b/videoclub/snapshots/2026-08-03.json new file mode 100644 index 0000000..0312f54 --- /dev/null +++ b/videoclub/snapshots/2026-08-03.json @@ -0,0 +1,698 @@ +{ + "fecha": "2026-08-03", + "items": [ + { + "id": "realdebrid:Downloads", + "name": "Downloads", + "clean": "Downloads", + "year": null, + "tipo": "pelicula" + }, + { + "id": "realdebrid:HARMOP47F3AP2", + "name": "Obsession Castellano-Ingles+Subt Castellano-Ingles H264 E-AC3 5.1 BD-Rip hd 1080p.mkv", + "clean": "Obsession Castellano-Ingles+Subt Castellano-Ingles H264 E-AC3 5 1 BD-Rip hd 1080p", + "year": null, + "tipo": "pelicula" + }, + { + "id": "realdebrid:V7XUZQ6APSG4Q", + "name": "Scary Movie (2026) [4k 2160p][Esp].mkv", + "clean": "Scary Movie", + "year": "2026", + "tipo": "pelicula" + }, + { + "id": "realdebrid:MBGEYHZC4MKYU", + "name": "Star Trek Strange New Worlds [HDTV 1080p][Cap.401].mkv", + "clean": "Star Trek Strange New Worlds", + "year": null, + "tipo": "serie" + }, + { + "id": "realdebrid:HEIP5O2XB5V66", + "name": "He-Man y los Masters del Universo (2026) [Bluray 1080p][Esp].mkv", + "clean": "He-Man y los Masters del Universo", + "year": "2026", + "tipo": "pelicula" + }, + { + "id": "realdebrid:SLJ2UJGPDFZLW", + "name": "Supergirl (2026) [Bluray 1080p][Esp].mkv", + "clean": "Supergirl", + "year": "2026", + "tipo": "serie" + }, + { + "id": "realdebrid:FC5FZS2J4HUFS", + "name": "El dia de la revelacion (Disclosure Day) (2026) [Bluray 1080p][Esp].mkv", + "clean": "El dia de la revelacion Disclosure Day", + "year": "2026", + "tipo": "pelicula" + }, + { + "id": "realdebrid:A5XIYLPNAZNZM", + "name": "El día de la revelacion (Disclosure Day) (2026) [4k 2160p][Esp].mkv", + "clean": "El día de la revelacion Disclosure Day", + "year": "2026", + "tipo": "pelicula" + }, + { + "id": "realdebrid:7XL55PFQOE4OO", + "name": "El Pasajero Nocturno (2026) [Bluray 1080p][Esp].mkv", + "clean": "El Pasajero Nocturno", + "year": "2026", + "tipo": "pelicula" + }, + { + "id": "realdebrid:5IHX4PFCFP5QY", + "name": "El Pasajero Nocturno (2026) [Bluray][Esp].avi", + "clean": "El Pasajero Nocturno", + "year": "2026", + "tipo": "pelicula" + }, + { + "id": "realdebrid:S52E6GZH2FSNK", + "name": "Disclosure.Day.(2026).(NO-ADS).1080p.x265.MD-AAC5.1+2.0.ITA-ENG.MmTRaXx(DD-CREW-IlCosaro).mkv", + "clean": "Disclosure Day NO-ADS 1080p x265 MD-AAC5 1+2 0 ITA-ENG MmTRaXx DD-CREW-IlCosaro", + "year": "2026", + "tipo": "pelicula" + }, + { + "id": "realdebrid:FOTT5OF2CNCQO", + "name": "Disclosure.Day.2026.1080p.CAMRip.ViruseProject.mkv", + "clean": "Disclosure Day 1080p ViruseProject", + "year": "2026", + "tipo": "pelicula" + }, + { + "id": "realdebrid:FEWY5OUINFE6I", + "name": "Obsession (2026) (2160p UHD BluRay x265 10bit DV HDR r00t).mkv", + "clean": "Obsession 2160p UHD x265 10bit DV HDR r00t", + "year": "2026", + "tipo": "pelicula" + }, + { + "id": "realdebrid:GE3KLARBGACYC", + "name": "Obsession (2026) (2160p UHD BluRay x265 10bit DV HDR TrueHD Atmos 7.1 r00t)", + "clean": "Obsession 2160p UHD x265 10bit DV HDR TrueHD Atmos 7 1 r00t", + "year": "2026", + "tipo": "pelicula" + }, + { + "id": "realdebrid:REQOOWL7R3X5M", + "name": "Backrooms.2026.2160p.4K.WEB.x265.10bit.AAC5.1-[YTS.GG - YTS.BZ].mkv", + "clean": "Backrooms 2160p 4K WEB x265 10bit AAC5 1", + "year": "2026", + "tipo": "pelicula" + }, + { + "id": "realdebrid:HEVMDYWAXLSLM", + "name": "Luger (2026) [Bluray 720p][Esp].mkv", + "clean": "Luger", + "year": "2026", + "tipo": "pelicula" + }, + { + "id": "realdebrid:MBSDHRJMTC3S2", + "name": "Spider-Man No Way Home 4Kremux2160.atomixhq.link.mkv", + "clean": "Spider-Man No Way Home 4Kremux2160 atomixhq link", + "year": null, + "tipo": "pelicula" + }, + { + "id": "realdebrid:YVLXIF6ILFL2U", + "name": "Iron Lung 2026 1080p.mkv", + "clean": "Iron Lung 2026 1080p", + "year": null, + "tipo": "pelicula" + }, + { + "id": "realdebrid:DLUAAXNZJ2ZHW", + "name": "From - S02E01 - Strangers in a Strange Land - WEBDL-1080p - Spanish 2x01 - audio [ES+EN] - sub [ES+EN].mkv", + "clean": "From - S02E01 - Strangers in a Strange Land - WEBDL-1080p - Spanish 2x01 - audio - sub", + "year": null, + "tipo": "serie" + }, + { + "id": "realdebrid:UP7DPBWVMH7JS", + "name": "La maldicion de Shelby Oaks (2026) [4k 2160p][Esp].mkv", + "clean": "La maldicion de Shelby Oaks", + "year": "2026", + "tipo": "pelicula" + }, + { + "id": "realdebrid:PMBQI365H7PU6", + "name": "Steven Spielberg el rey midas de Hollywood (2024) [HDTV 1080p][Esp](wolfmax4k.com).mkv", + "clean": "Steven Spielberg el rey midas de Hollywood wolfmax4k com", + "year": "2024", + "tipo": "pelicula" + }, + { + "id": "realdebrid:OWWSTBTFG4ZFO", + "name": "Fiasco total La tragedia del festival Astroworld (2025) [HDTV 1080p][Esp].mkv", + "clean": "Fiasco total La tragedia del festival Astroworld", + "year": "2025", + "tipo": "pelicula" + }, + { + "id": "realdebrid:M4UVGSNUKTLA6", + "name": "Fiasco total La tragedia del festival Astroworld (2025) [HDTV 1080p][Esp].mkv", + "clean": "Fiasco total La tragedia del festival Astroworld", + "year": "2025", + "tipo": "pelicula" + }, + { + "id": "realdebrid:7HQN7ELMLWTDI", + "name": "Fiasco total La tragedia del festival Astroworld (2025) [HDTV 1080p][Esp].mkv", + "clean": "Fiasco total La tragedia del festival Astroworld", + "year": "2025", + "tipo": "pelicula" + }, + { + "id": "realdebrid:BRNWEZP2TGOEQ", + "name": "La momia de Lee Cronin Castellano-Ingles+Subt Castellano-Ingles H264 E-AC3 5.1 BD-Rip hd 1080p.mkv", + "clean": "La momia de Lee Cronin Castellano-Ingles+Subt Castellano-Ingles H264 E-AC3 5 1 BD-Rip hd 1080p", + "year": null, + "tipo": "pelicula" + }, + { + "id": "realdebrid:3MNHGJ3UM73VY", + "name": "super mario galaxy la película Castellano-Ingles+Subt Castellano-Ingles H264 E-AC3 5.1 BD-Rip hd 1080p.mkv", + "clean": "super mario galaxy la película Castellano-Ingles+Subt Castellano-Ingles H264 E-AC3 5 1 BD-Rip hd 1080p", + "year": null, + "tipo": "pelicula" + }, + { + "id": "realdebrid:PKZ3B7VEZXWZQ", + "name": "Super Mario Galaxy La película (2026) [4k 2160p][Esp].mkv", + "clean": "Super Mario Galaxy La película", + "year": "2026", + "tipo": "pelicula" + }, + { + "id": "realdebrid:6RE4EY5ZP2ILA", + "name": "Proyecto Salvacion (2026) [Bluray 1080p][Esp].mkv", + "clean": "Salvacion", + "year": "2026", + "tipo": "pelicula" + }, + { + "id": "realdebrid:ASX6FSY2ZZD36", + "name": "Heidi Girl of the Alps (Alps no Shoujo Heidi) (Season 1) (BD 1080p)(HEVC x265 10bit)(Eng-Subs)-Judas[TGx]", + "clean": "Heidi Girl of the Alps Alps no Shoujo Heidi Season 1 BD 1080p HEVC x265 10bit Eng-Subs -Judas", + "year": null, + "tipo": "serie" + }, + { + "id": "realdebrid:K4CJIWAJF3NKS", + "name": "Greenland El Ultimo Refugio (2020) [BluRay Rip][AC3 5.1 Castellano][www.PctFenix.com].avi", + "clean": "Greenland El Ultimo Refugio", + "year": "2020", + "tipo": "pelicula" + }, + { + "id": "realdebrid:KDWFL34NA3MXE", + "name": "Greenland [4K UHDremux][2160p][HDR10][AC3 5.1 Castellano-True HD 7.1-Ingles+Subs][ES-EN]", + "clean": "Greenland", + "year": null, + "tipo": "pelicula" + }, + { + "id": "realdebrid:KW4WNKPELJM5O", + "name": "Greenland 2 [4k 2160p][Esp].mkv", + "clean": "Greenland 2", + "year": null, + "tipo": "pelicula" + }, + { + "id": "realdebrid:WEFMCETRL5BZM", + "name": "Resident Evil [FullUHD 2160p][Castellano AC3 5.1-Ingles DolbyTrueHD 7.1+Subs]", + "clean": "Resident Evil", + "year": null, + "tipo": "pelicula" + }, + { + "id": "realdebrid:CFPM3BI4C7EXO", + "name": "Proyecto Salvacion (2026) [4k 2160p][Esp].mkv", + "clean": "Salvacion", + "year": "2026", + "tipo": "pelicula" + }, + { + "id": "realdebrid:5W6E6YBRA7V22", + "name": "Project.Hail.Mary.2026.2160p.KinoRip.h265.En.Es.Dual YG.mkv", + "clean": "Project Hail Mary 2160p KinoRip h265 En Es Dual YG", + "year": "2026", + "tipo": "pelicula" + }, + { + "id": "realdebrid:3GJHZMZQUQ544", + "name": "Project.Hail.Mary.2026.2160p.KinoRip.h265.En.Es.Dual YG.mkv", + "clean": "Project Hail Mary 2160p KinoRip h265 En Es Dual YG", + "year": "2026", + "tipo": "pelicula" + }, + { + "id": "realdebrid:YAFM2WGO4IR64", + "name": "Project.Hail.Mary.2026.2160p.KinoRip.h265.En.Es.Dual YG.mkv", + "clean": "Project Hail Mary 2160p KinoRip h265 En Es Dual YG", + "year": "2026", + "tipo": "pelicula" + }, + { + "id": "realdebrid:RBESCUG7LBCH2", + "name": "Twilight Saga (2008-2012) 2160p H265 HDR10 AC3 5.1 ITA.ENG sub ita.eng Sp33dy94-MIRCrew", + "clean": "Twilight Saga 2008-2012 2160p H265 HDR10 AC3 5 1 ITA ENG sub ita eng Sp33dy94-MIRCrew", + "year": null, + "tipo": "pelicula" + }, + { + "id": "realdebrid:ZYLMP5J4H3VE6", + "name": "Monarch El Legado De Los Monstruos [4k 2160p][Cap.101](wolfmax4k.com).mkv", + "clean": "Monarch El Legado De Los Monstruos wolfmax4k com", + "year": null, + "tipo": "serie" + }, + { + "id": "realdebrid:37ZFJ63K6W7PM", + "name": "Stargate_Sg-1_05x12_Agujero_X-Tremo.avi", + "clean": "Stargate Sg-1 05x12 Agujero X-Tremo", + "year": null, + "tipo": "serie" + }, + { + "id": "realdebrid:6JJIFVQ5MZQEI", + "name": "TheAdventuresOfTomSawyer", + "clean": "TheAdventuresOfTomSawyer", + "year": null, + "tipo": "pelicula" + }, + { + "id": "realdebrid:5KFSC2OVN37MO", + "name": "The Studio [HDTV 1080p][Cap.105]", + "clean": "The Studio", + "year": null, + "tipo": "serie" + }, + { + "id": "realdebrid:3AS7OJ3EXXKMC", + "name": "Stargate_Sg-1_05x10_2001.avi", + "clean": "Stargate Sg-1 05x10 2001", + "year": null, + "tipo": "serie" + }, + { + "id": "realdebrid:UYIBLKOIL5HD6", + "name": "The Studio [HDTV 1080p][Cap.104]", + "clean": "The Studio", + "year": null, + "tipo": "serie" + }, + { + "id": "realdebrid:CQ5CWIAKCM3ZS", + "name": "The Studio [HDTV 1080p][Cap.103]", + "clean": "The Studio", + "year": null, + "tipo": "serie" + }, + { + "id": "realdebrid:TMZRDVHVHUHRQ", + "name": "The Studio [HDTV 1080p][cap.102](wolfmax4k.com).mkv", + "clean": "The Studio wolfmax4k com", + "year": null, + "tipo": "serie" + }, + { + "id": "realdebrid:S5HO3BW6ADQYI", + "name": "Euphoria [4k 2160p][Cap.302].mkv", + "clean": "Euphoria", + "year": null, + "tipo": "serie" + }, + { + "id": "realdebrid:CCDJGDZJK3FRA", + "name": "Stargate_Sg-1_05x09_Entre_Dos_Fuegos.avi", + "clean": "Stargate Sg-1 05x09 Entre Dos Fuegos", + "year": null, + "tipo": "serie" + }, + { + "id": "realdebrid:V3YXSRWTFO6GA", + "name": "Stargate_Sg-1_05x08_La_Tumba.avi", + "clean": "Stargate Sg-1 05x08 La Tumba", + "year": null, + "tipo": "serie" + }, + { + "id": "realdebrid:U45QORZXVKJO2", + "name": "Stargate_Sg-1_05x07_Bestias_De_Carga.avi", + "clean": "Stargate Sg-1 05x07 Bestias De Carga", + "year": null, + "tipo": "serie" + }, + { + "id": "realdebrid:NVQL2WDXVLFRA", + "name": "Euphoria [4k 2160p][Cap.301].mkv", + "clean": "Euphoria", + "year": null, + "tipo": "serie" + }, + { + "id": "realdebrid:RES5Z4DNSGW2W", + "name": "The.Strangers.Chapter.3.2026.REMUX.mkv", + "clean": "The Strangers Chapter 3", + "year": "2026", + "tipo": "pelicula" + }, + { + "id": "realdebrid:2BNTPEM3HHNEW", + "name": "Undertone.2025.TS.1080p.mkv", + "clean": "Undertone TS 1080p", + "year": "2025", + "tipo": "pelicula" + }, + { + "id": "realdebrid:JMC5EIDY7OB7S", + "name": "Send Help (2026) [1080p][Castellano][VerPeliculasOnline.org].mp4", + "clean": "Send Help", + "year": "2026", + "tipo": "pelicula" + }, + { + "id": "realdebrid:HAAQBZMX7C25M", + "name": "Project Hail Mary [2026] HDTS YG", + "clean": "Project Hail Mary HDTS YG", + "year": null, + "tipo": "pelicula" + }, + { + "id": "realdebrid:RBGLQM67DWPTY", + "name": "Project Hail Mary [2026] HDTS YG", + "clean": "Project Hail Mary HDTS YG", + "year": null, + "tipo": "pelicula" + }, + { + "id": "realdebrid:PZULLAII7RWQY", + "name": "Antes.Del.Fin.Del.Mundo.2025.1080P-Dual-Lat.mkv", + "clean": "Antes Del Fin Del Mundo 1080P-Dual-Lat", + "year": "2025", + "tipo": "pelicula" + }, + { + "id": "realdebrid:KG2IPTOAWUT32", + "name": "Scream 7 (2026) [4k 2160p][Esp].mkv", + "clean": "Scream 7", + "year": "2026", + "tipo": "pelicula" + }, + { + "id": "realdebrid:7QTPWB374KGNS", + "name": "The Pitt [4k 2160p][Cap.208].mkv", + "clean": "The Pitt", + "year": null, + "tipo": "serie" + }, + { + "id": "realdebrid:VYOK3HADKMWUQ", + "name": "Cold.Storage (2026) CZtit 1080p.mkv", + "clean": "Cold Storage CZtit 1080p", + "year": "2026", + "tipo": "pelicula" + }, + { + "id": "realdebrid:ERFMQMJT7G7EK", + "name": "Project.Hail.Mary.2026.1080p.TELESYNC.HC.x264-SyncUP", + "clean": "Project Hail Mary 1080p HC x264-SyncUP", + "year": "2026", + "tipo": "pelicula" + }, + { + "id": "realdebrid:4MUAV4N7S7HV4", + "name": "Project Hail Mary (2026) HDTS Clean Audios - 1080p - x264 - [Tel + Tam + Eng] - AAC - 2.9GB.mkv", + "clean": "Project Hail Mary HDTS Clean Audios - 1080p - x264 - - AAC - 2 9GB", + "year": "2026", + "tipo": "pelicula" + }, + { + "id": "realdebrid:HGMVFV6YCBJSI", + "name": "[Aventurierii SpaÅ£iului] [Silver Zero Subs] Heidi Girl of the Alps 01-52 (Complete) [South Wind Subs] RO EN - subs only", + "clean": "Heidi Girl of the Alps 01-52 Complete RO EN - subs only", + "year": null, + "tipo": "serie" + }, + { + "id": "realdebrid:VBOVCQIFEBFX2", + "name": "[Aventurierii SpaÅ£iului] [Silver Zero Subs] Heidi Girl of the Alps 01-52 (Complete) [South Wind Subs] RO EN - subs only", + "clean": "Heidi Girl of the Alps 01-52 Complete RO EN - subs only", + "year": null, + "tipo": "serie" + }, + { + "id": "realdebrid:5YWKOFRQHBLMI", + "name": "[Moozzi2] Heidi Girl of the Alps - TV + SP", + "clean": "Heidi Girl of the Alps - TV + SP", + "year": null, + "tipo": "serie" + }, + { + "id": "realdebrid:SJXAYGRNV63RM", + "name": "[Moozzi2] Heidi Girl of the Alps - TV + SP", + "clean": "Heidi Girl of the Alps - TV + SP", + "year": null, + "tipo": "serie" + }, + { + "id": "realdebrid:XIUQNANBN3X74", + "name": "Heidi Serie Completa (1974) 1080p H265 AC3 2.0 ITA Sp33dy94-MIRCrew", + "clean": "Heidi Serie Completa 1080p H265 AC3 2 0 ITA Sp33dy94-MIRCrew", + "year": "1974", + "tipo": "serie" + }, + { + "id": "realdebrid:OFMR7Y4UKPD5G", + "name": "Cold.Storage.2026.2160p.SDR.mkv", + "clean": "Cold Storage 2160p SDR", + "year": "2026", + "tipo": "pelicula" + }, + { + "id": "realdebrid:M33WYMJPJPQDQ", + "name": "Star.Trek.Starfleet.Academy.S01E10.2160p.WEB.h265-ETHEL.mkv", + "clean": "Star Trek Starfleet Academy S01E10 2160p WEB h265-ETHEL", + "year": null, + "tipo": "serie" + }, + { + "id": "realdebrid:GALXSP3XEU43E", + "name": "Paradise [4k 2160p][Cap.101](wolfmax4k.com).mkv", + "clean": "Paradise wolfmax4k com", + "year": null, + "tipo": "serie" + }, + { + "id": "realdebrid:7KXON7KHRVHNY", + "name": "Good Luck Have Fun Dont Die 2025.mkv", + "clean": "Good Luck Have Fun Dont Die 2025", + "year": null, + "tipo": "pelicula" + }, + { + "id": "realdebrid:5RZNKMUA2GEL6", + "name": "[Erai-raws] Detective Conan - 0001 ~ 0123 [1080p][Multiple Subtitle]", + "clean": "Detective Conan - 0001 ~ 0123", + "year": null, + "tipo": "serie" + }, + { + "id": "realdebrid:YER4TPBZANP2K", + "name": "Star Trek Starfleet Academy S01e01-10 (1080p Ita Eng Spa h265 10bit SubS) REPACK byMe7alh", + "clean": "Star Trek Starfleet Academy S01e01-10 1080p Ita Eng Spa h265 10bit SubS byMe7alh", + "year": null, + "tipo": "serie" + }, + { + "id": "realdebrid:LSARRQ34VFGD4", + "name": "The Pitt [4k 2160p][Cap.207].mkv", + "clean": "The Pitt", + "year": null, + "tipo": "serie" + }, + { + "id": "realdebrid:KJAA6YVBTUBTO", + "name": "Star.Trek.Starfleet.Academy.S01e09.Ita.Eng.Spa.1080p.h265.10bit.SubS-Me7alh.mkv", + "clean": "Star Trek Starfleet Academy S01e09 Ita Eng Spa 1080p h265 10bit SubS-Me7alh", + "year": null, + "tipo": "serie" + }, + { + "id": "realdebrid:MKRREJSCVWV74", + "name": "Star.Trek.Starfleet.Academy.S01E09.1080p.AV1.10bit-MeGusta.mkv", + "clean": "Star Trek Starfleet Academy S01E09 1080p AV1 10bit-MeGusta", + "year": null, + "tipo": "serie" + }, + { + "id": "realdebrid:HVEXYKBXKBI6A", + "name": "Private.26.02.19.Layla.Scarlett.XXX.720p.HEVC.x265.PRT", + "clean": "Private 26 02 19 Layla Scarlett XXX 720p HEVC x265 PRT", + "year": null, + "tipo": "adulto" + }, + { + "id": "realdebrid:NDV2FHUXUGP3I", + "name": "Private.26.02.19.Layla.Scarlett.XXX.1080p.HEVC.x265.PRT", + "clean": "Private 26 02 19 Layla Scarlett XXX 1080p HEVC x265 PRT", + "year": null, + "tipo": "adulto" + }, + { + "id": "realdebrid:X3ZMVFP3QSGDS", + "name": "SexAndSubmission.26.02.27.Hazel.Heart.XXX.1080p.HEVC.x265.PRT", + "clean": "SexAndSubmission 26 02 27 Hazel Heart XXX 1080p HEVC x265 PRT", + "year": null, + "tipo": "adulto" + }, + { + "id": "realdebrid:L5FXWPSER6FIE", + "name": "Sin piedad (Mercy) (2026) [4k 2160p][Esp].mkv", + "clean": "Sin piedad Mercy", + "year": "2026", + "tipo": "pelicula" + }, + { + "id": "realdebrid:C46WHLHCLMUUY", + "name": "Star.Trek.Starfleet.Academy.S01e07.Ita.Eng.Spa.1080p.h265.10bit.SubS-Me7alh.mkv", + "clean": "Star Trek Starfleet Academy S01e07 Ita Eng Spa 1080p h265 10bit SubS-Me7alh", + "year": null, + "tipo": "serie" + }, + { + "id": "realdebrid:ZE5IK6C3PN7XI", + "name": "Zootropolis 2 (2025) [4k 2160p][Esp].mkv", + "clean": "Zootropolis 2", + "year": "2025", + "tipo": "pelicula" + }, + { + "id": "realdebrid:TCRNMMYBVANAS", + "name": "TheLifeErotic.26.02.15.Megan.Love.Lounge.And.Lure.2.XXX.1080p.HEVC.x265.PRT", + "clean": "TheLifeErotic 26 02 15 Megan Love Lounge And Lure 2 XXX 1080p HEVC x265 PRT", + "year": null, + "tipo": "adulto" + }, + { + "id": "realdebrid:RKTXMNTGIK6YA", + "name": "OnlyTarts.26.02.12.Lula.Stocch.For.Onlytarts.XXX.720p.HEVC.x265.PRT", + "clean": "OnlyTarts 26 02 12 Lula Stocch For Onlytarts XXX 720p HEVC x265 PRT", + "year": null, + "tipo": "adulto" + }, + { + "id": "realdebrid:6XVHJRPHIPOCI", + "name": "Private.25.10.25.Calita.Fire.XXX.1080p.HEVC.x265.PRT", + "clean": "Private 25 10 25 Calita Fire XXX 1080p HEVC x265 PRT", + "year": null, + "tipo": "adulto" + }, + { + "id": "realdebrid:NSGBPTHVNRDXY", + "name": "EvilAngel.25.11.18.Molly.Smith.XXX.1080p.HEVC.x265.PRT", + "clean": "EvilAngel 25 11 18 Molly Smith XXX 1080p HEVC x265 PRT", + "year": null, + "tipo": "adulto" + }, + { + "id": "realdebrid:QEUINXVKGQCVS", + "name": "MonstersOfCock.26.02.15.Sooky.Sin.XXX.1080p.HEVC.x265.PRT", + "clean": "MonstersOfCock 26 02 15 Sooky Sin XXX 1080p HEVC x265 PRT", + "year": null, + "tipo": "adulto" + }, + { + "id": "realdebrid:ZPFYMNI474GUQ", + "name": "MonstersOfCock.26.02.15.Sooky.Sin.XXX.720p.HEVC.x265.PRT", + "clean": "MonstersOfCock 26 02 15 Sooky Sin XXX 720p HEVC x265 PRT", + "year": null, + "tipo": "adulto" + }, + { + "id": "realdebrid:KKXM3WFQIFIGQ", + "name": "BrazzersExxtra.26.02.15.Jadynn.Stone.And.Archer.Ali.Lesbian.Loses.Her.Gold.Star.XXX.1080p.HEVC.x265.PRT", + "clean": "BrazzersExxtra 26 02 15 Jadynn Stone And Archer Ali Lesbian Loses Her Gold Star XXX 1080p HEVC x265 PRT", + "year": null, + "tipo": "adulto" + }, + { + "id": "realdebrid:ZDVKQAD7GT52Y", + "name": "BrazzersExxtra.26.02.15.Jadynn.Stone.And.Archer.Ali.Lesbian.Loses.Her.Gold.Star.XXX.720p.HEVC.x265.PRT", + "clean": "BrazzersExxtra 26 02 15 Jadynn Stone And Archer Ali Lesbian Loses Her Gold Star XXX 720p HEVC x265 PRT", + "year": null, + "tipo": "adulto" + }, + { + "id": "realdebrid:EZARPTHU5LFZS", + "name": "Heidi Girl of the Alps (Alps no Shoujo Heidi) (Season 1) (BD 1080p)(HEVC x265 10bit)(Eng-Subs)-Judas[TGx]", + "clean": "Heidi Girl of the Alps Alps no Shoujo Heidi Season 1 BD 1080p HEVC x265 10bit Eng-Subs -Judas", + "year": null, + "tipo": "serie" + }, + { + "id": "realdebrid:SCGY4M4OAOQE2", + "name": "The Pitt [HDTV 720p][Cap.206].mkv", + "clean": "The Pitt", + "year": null, + "tipo": "serie" + }, + { + "id": "realdebrid:4ZA5PAJIMXLQU", + "name": "The Pitt [4k 2160p][Cap.205].mkv", + "clean": "The Pitt", + "year": null, + "tipo": "serie" + }, + { + "id": "realdebrid:PLYFVK2SFFMLO", + "name": "The Pitt [4k 2160p][Cap.204].mkv", + "clean": "The Pitt", + "year": null, + "tipo": "serie" + }, + { + "id": "realdebrid:SCULQL7ZNLRDA", + "name": "The Pitt [4k 2160p][Cap.203].mkv", + "clean": "The Pitt", + "year": null, + "tipo": "serie" + }, + { + "id": "realdebrid:D253CGGICWID4", + "name": "Desaparecida [HDTV 1080p][Cap.102].mkv", + "clean": "Desaparecida", + "year": null, + "tipo": "serie" + }, + { + "id": "realdebrid:77XAL7BCZGS6G", + "name": "Vanished [HDTV 1080p][Cap.101].mkv", + "clean": "Vanished", + "year": null, + "tipo": "serie" + }, + { + "id": "realdebrid:L3JH4WU64FFM6", + "name": "ItsAnal.25.11.01.Ravyn.Alexa.Ravyns.First.DP.XXX.1080p.HEVC.x265.PRT", + "clean": "ItsAnal 25 11 01 Ravyn Alexa Ravyns First DP XXX 1080p HEVC x265 PRT", + "year": null, + "tipo": "adulto" + }, + { + "id": "realdebrid:AHDF4O2PQWQVM", + "name": "ItsAnal.25.11.01.Ravyn.Alexa.Ravyns.First.DP.XXX.720p.HEVC.x265.PRT", + "clean": "ItsAnal 25 11 01 Ravyn Alexa Ravyns First DP XXX 720p HEVC x265 PRT", + "year": null, + "tipo": "adulto" + } + ] +} \ No newline at end of file diff --git a/videoclub/tg_notify.py b/videoclub/tg_notify.py new file mode 100644 index 0000000..0e224a3 --- /dev/null +++ b/videoclub/tg_notify.py @@ -0,0 +1,56 @@ +""" +tg_notify.py — Envia el resumen diario del videoclub SOLO al canal IDD de Telegram. + +Reutiliza el mecanismo de idd_channel.py (bot API) para que los mensajes +vayan exclusivamente al canal IDD (-1003967773087), nunca a otros sitios. +""" +import json +import sys +from pathlib import Path + +REPO_NEGOCIO = Path(r"C:\Users\juanm\Documents\GitHub\biblioteca_negocio_prolongo\scripts") + +sys.path.insert(0, str(REPO_NEGOCIO)) +import idd_channel # noqa: E402 + + +def _formatear(fecha, items, novedades): + g = {"pelicula": [], "serie": [], "adulto": [], "otro": []} + for it in items: + tipo = it["tipo"] + g.setdefault(tipo, []).append(it) + totales = {k: len(v) for k, v in g.items()} + + lineas = [f"🎬 *Videoclub {fecha}*", + f"Disponibles: {len(items)} · " + f"Novedades: {len(novedades)}", + ""] + if novedades: + lineas.append(f"✨ *Novedades ({len(novedades)})*") + lineas.append("") + for it in novedades[:20]: + marca = {"pelicula": "🎬", "serie": "📺", "adulto": "🔞", "otro": "📁"}.get(it["tipo"], "📁") + y = f" ({it['year']})" if it["year"] else "" + lineas.append(f"{marca} {it['clean']}{y}") + if len(novedades) > 20: + lineas.append(f"... y {len(novedades) - 20} más") + return "\n".join(lineas) + + +def enviar_novedades(fecha, items, novedades): + texto = _formatear(fecha, items, novedades) + # Limitar a 3500 caracteres (limite de Telegram) + if len(texto) > 3500: + texto = texto[:3450] + "\n…" + return idd_channel.send_message(texto) + + +if __name__ == "__main__": + if len(sys.argv) < 2: + print("Uso: python tg_notify.py 'texto'") + sys.exit(1) + texto = sys.argv[1] + # Estructura mínima para reutilizar _formatear manualmente + # (normalmente se llama desde videoclub.py con datos reales) + r = idd_channel.send_message(texto) + print(f"Enviado a IDD: {'OK' if r else 'fallo'}") diff --git a/videoclub/videoclub.py b/videoclub/videoclub.py new file mode 100644 index 0000000..a7e02b0 --- /dev/null +++ b/videoclub/videoclub.py @@ -0,0 +1,233 @@ +""" +videoclub.py — Listado diario de videos disponibles en el catalogo RealDebrid +de Torrentio (addon de Stremio). + +Consultas: + https://torrentio.strem.fun//catalog/other/torrentio-realdebrid.json + +Hace snapshot diario, detecta novedades respecto al dia anterior y genera +un listado markdown. Con --notify envia resumen por Telegram. +""" +import argparse +import json +import re +import sys +import urllib.request +from datetime import datetime +from pathlib import Path + +BASE = Path(__file__).resolve().parent +sys.path.insert(0, str(BASE)) + +import config + +CATALOGO = "https://torrentio.strem.fun/{config}/catalog/other/torrentio-realdebrid.json" + +# Patrones para clasificar titulos +YEAR_RE = re.compile(r"\((19\d\d|20\d\d)\)") +YEAR_BARE_RE = re.compile(r"\.(19\d\d|20\d\d)\.") +SERIE_RE = re.compile(r"(S\d{1,2}E\d{1,3}|Cap[\.\s]|cap[\.\s]|Temporada|temp\.|\bS0?1E\d|\dx\d\d)", re.IGNORECASE) +EPISODE_RE = re.compile(r"\.S\d{1,2}E\d{1,3}\.", re.IGNORECASE) +ADULTO_RE = re.compile(r"(\.XXX\.|XXX\.|private\.|brazzers|onlytarts|spankbang|xhamster|porntrex|missav|sexandsubmission|evilangel|monstersofcock|itsanal|thelifeerotic)", re.IGNORECASE) +SERIE_PALABRAS = {"star trek", "stargate", "heidi", "euphoria", "from", "the pitt", + "supergirl", "monarch", "paradise", "desaparecida", "vanished", + "strange new worlds", "star trek strange", "the studio", + "one punch man", "conan", "detective conan"} +EXTRA_SUCIO = ["wolfmax4k.com", "pctfenix", "pctfenix.com", "yts", "yts.mx", + "rarbg", "verpeliculasonline", "viruse", "proyecto", "kikorip", + "camrip", "telesync", "hdtv", "bluray", "remux", "webrip", "bdrip", + "repack", "proper", "xtrem"] + + +def clean_filename(name): + """Limpia un nombre de fichero y devuelve (titulo_limpio, year, tipo).""" + name = re.sub(r"\.(mkv|mp4|avi|mov|webm|m4v)$", "", name.strip(), flags=re.IGNORECASE) + year = None + m = YEAR_RE.search(name) + if m: + year = m.group(1) + name = name.replace(m.group(0), " ") + else: + m = YEAR_BARE_RE.search(name) + if m: + year = m.group(1) + name = name.replace(m.group(0), " ") + + es_serie = bool(SERIE_RE.search(name)) or any(p in name.lower() for p in SERIE_PALABRAS) + es_adulto = bool(ADULTO_RE.search(name)) + + # Quitar etiquetas entre corchetes y otros ruidos + name = re.sub(r"\[[^\]]*\]", " ", name) + name = re.sub(r"[\(\)\[\]]", " ", name) + name = name.replace("_", " ").replace(".", " ") + # Colapsar espacios + name = re.sub(r"\s+", " ", name).strip() + # Quitar palabras sueltas de calidad/formato residuales + tokens = [t for t in name.split(" ") if t.lower() not in EXTRA_SUCIO] + name = " ".join(tokens).strip(" -–") + name = re.sub(r"\s+", " ", name).strip() + + tipo = "adulto" if es_adulto else ("serie" if es_serie else "pelicula") + return name, year, tipo + + +def fetch_catalogo(): + """Descarga el catalogo y devuelve lista de items [{id,name,tipo,clean,year}].""" + url = CATALOGO.format(config=config.TORRENTIO_CONFIG_WITH_TOKEN) + req = urllib.request.Request(url, headers={"User-Agent": "Mozilla/5.0"}) + with urllib.request.urlopen(req, timeout=40) as r: + data = json.loads(r.read().decode("utf-8")) + items = [] + for m in data.get("metas", []): + clean, year, tipo = clean_filename(m.get("name", "")) + items.append({ + "id": m.get("id"), + "name": m.get("name"), + "clean": clean, + "year": year, + "tipo": tipo, + }) + return items + + +def cargar_snapshot(fecha): + p = BASE / "snapshots" / f"{fecha}.json" + if not p.exists(): + return None + with open(p, encoding="utf-8") as f: + return json.load(f) + + +def guardar_snapshot(fecha, items): + p = BASE / "snapshots" / f"{fecha}.json" + with open(p, "w", encoding="utf-8") as f: + json.dump({"fecha": fecha, "items": items}, f, ensure_ascii=False, indent=2) + + +def diff_novedades(hoy, ayer): + """Devuelve items de hoy que no estaban en el snapshot de ayer.""" + if not ayer: + return hoy + ids_ayer = {i["id"] for i in ayer["items"]} + return [i for i in hoy if i["id"] not in ids_ayer] + + +def agrupar(items): + g = {"pelicula": [], "serie": [], "adulto": [], "otro": []} + for it in items: + tipo = it["tipo"] + if tipo not in g: + tipo = "otro" + g[tipo].append(it) + for k in g: + g[k].sort(key=lambda x: (x["clean"] or "").lower()) + return g + + +def generar_markdown(fecha, items, novedades): + g = agrupar(items) + gn = agrupar(novedades) + lineas = [f"# Videoclub — {fecha}", ""] + lineas.append(f"**Total disponibles: {len(items)}** | " + f"Novedades: {len(novedades)}") + lineas.append("") + for seccion, clave in [("Novedades", None)]: + if novedades: + lineas.append(f"## Novedades ({len(novedades)})") + lineas.append("") + for it in novedades: + marca = {"pelicula": "🎬", "serie": "📺", "adulto": "🔞", "otro": "📁"}.get(it["tipo"], "📁") + y = f" ({it['year']})" if it["year"] else "" + lineas.append(f"- {marca} {it['clean']}{y} `{it['name'][:60]}`") + lineas.append("") + for nombre, clave in [("Películas", "pelicula"), ("Series", "serie"), + ("Adulto", "adulto"), ("Otros", "otro")]: + if g[clave]: + lineas.append(f"## {nombre} ({len(g[clave])})") + lineas.append("") + for it in g[clave]: + y = f" ({it['year']})" if it["year"] else "" + lineas.append(f"- {it['clean']}{y}") + lineas.append("") + return "\n".join(lineas) + + +def enlace_realdebrid(rd_id): + """Devuelve el enlace directo de descarga para un id de torrent RD.""" + import urllib.parse + rd_id = rd_id.split(":", 1)[-1] + tok = config.TORRENTIO_RD_TOKEN + url = f"https://api.real-debrid.com/rest/1.0/torrents/info/{urllib.parse.quote(rd_id)}" + req = urllib.request.Request(url, headers={"Authorization": f"Bearer {tok}"}) + with urllib.request.urlopen(req, timeout=30) as r: + info = json.loads(r.read().decode("utf-8")) + links = info.get("links") or [] + if not links: + print(f"[RD] Sin enlace descargable para {rd_id}") + return None + return links[0] + + +def buscar_item(items, termino): + """Busca un item del catalogo por titulo (case-insensitive) o por id.""" + t = termino.strip().lower() + for it in items: + if it["id"].lower() == t or it["id"].lower().replace("realdebrid:", "") == t: + return it + if t in (it.get("clean") or "").lower() or t in (it.get("name") or "").lower(): + return it + return None + + +def main(): + ap = argparse.ArgumentParser(description="Videoclub: listado diario RealDebrid") + ap.add_argument("--notify", action="store_true", + help="Enviar resumen de novedades por Telegram") + ap.add_argument("--fecha", help="Fecha del snapshot (YYYY-MM-DD), por defecto hoy") + ap.add_argument("--descargar", metavar="ID|TITULO", + help="Anadir un titulo del catalogo a Download Station del NAS") + args = ap.parse_args() + + if args.descargar: + items = fetch_catalogo() + it = buscar_item(items, args.descargar) + if not it: + print(f"[NAS] No se encontro '{args.descargar}' en el catalogo") + return 1 + enlace = enlace_realdebrid(it["id"]) + if not enlace: + return 1 + print(f"[NAS] {it['clean']} -> {enlace[:80]}") + import nas_dl + ok = nas_dl.add_torrent(enlace) + return 0 if ok else 1 + + fecha = args.fecha or datetime.now().strftime("%Y-%m-%d") + items = fetch_catalogo() + # Snapshot de referencia: el mas reciente con fecha distinta de hoy + ref = None + snaps = sorted((BASE / "snapshots").glob("*.json")) + for s in reversed(snaps): + if s.stem != fecha: + with open(s, encoding="utf-8") as f: + ref = json.load(f) + break + guardar_snapshot(fecha, items) + novedades = diff_novedades(items, ref) + + md = generar_markdown(fecha, items, novedades) + listado = BASE / "listados" / f"{fecha}.md" + listado.write_text(md, encoding="utf-8") + + print(f"Videoclub {fecha}: {len(items)} disponibles, {len(novedades)} novedades") + print(f"Listado: {listado}") + + if args.notify: + from tg_notify import enviar_novedades + enviar_novedades(fecha, items, novedades) + + return 0 + + +if __name__ == "__main__": + sys.exit(main())