diff --git a/sites/movistarplus.es/__data__/content.html b/sites/movistarplus.es/__data__/content.html index 344606d9..135a25f8 100644 --- a/sites/movistarplus.es/__data__/content.html +++ b/sites/movistarplus.es/__data__/content.html @@ -3,11 +3,11 @@ - Programación TV de La Sexta | Movistar Plus+ + Programación TV de La Sexta viernes 30 de mayo | Movistar Plus+ - + @@ -22,9 +22,9 @@ - + - + @@ -63,6 +63,7 @@ "position": 3, "item": { "@type": "Thing", + "@id": "https://www.movistarplus.es/programacion-tv/sexta", "name": "La Sexta" } } @@ -74,8 +75,8 @@ "@context": "http://schema.org", "@type": "ItemList", "name": "Programación de La Sexta", - "url": "https://www.movistarplus.es/programacion-tv/sexta/2025-01-23", - "numberOfItems": 20, + "url": "https://www.movistarplus.es/programacion-tv/sexta", + "numberOfItems": 23, "itemListElement": [ { "@type": "ListItem", @@ -83,8 +84,8 @@ "item": { "@type": "BroadcastEvent", "name": "Venta Prime", - "startDate": "2025-01-23T06:00:00+01:00", - "endDate": "2025-01-23T06:45:00+01:00", + "startDate": "2025-05-30T05:15:00+02:00", + "endDate": "2025-05-30T06:25:00+02:00", "publishedOn": { "@type": "BroadcastService", "name": "La Sexta" @@ -96,9 +97,9 @@ "position": 2, "item": { "@type": "BroadcastEvent", - "name": "Remescar cosmética al instante: Episodio 15", - "startDate": "2025-01-23T06:45:00+01:00", - "endDate": "2025-01-23T07:00:00+01:00", + "name": "Optima mayores: complementa tu pensión", + "startDate": "2025-05-30T06:25:00+02:00", + "endDate": "2025-05-30T06:45:00+02:00", "publishedOn": { "@type": "BroadcastService", "name": "La Sexta" @@ -110,9 +111,9 @@ "position": 3, "item": { "@type": "BroadcastEvent", - "name": "Previo Aruser@s: Episodio 1366", - "startDate": "2025-01-23T07:00:00+01:00", - "endDate": "2025-01-23T09:00:00+01:00", + "name": "Remescar cosmética al instante: Episodio 17", + "startDate": "2025-05-30T06:45:00+02:00", + "endDate": "2025-05-30T07:00:00+02:00", "publishedOn": { "@type": "BroadcastService", "name": "La Sexta" @@ -124,9 +125,9 @@ "position": 4, "item": { "@type": "BroadcastEvent", - "name": "Aruser@s: Episodio 1366", - "startDate": "2025-01-23T09:00:00+01:00", - "endDate": "2025-01-23T11:00:00+01:00", + "name": "Previo Aruser@s: Episodio 1454", + "startDate": "2025-05-30T07:00:00+02:00", + "endDate": "2025-05-30T09:00:00+02:00", "publishedOn": { "@type": "BroadcastService", "name": "La Sexta" @@ -138,9 +139,9 @@ "position": 5, "item": { "@type": "BroadcastEvent", - "name": "Al rojo vivo: Episodio 3517", - "startDate": "2025-01-23T11:00:00+01:00", - "endDate": "2025-01-23T14:30:00+01:00", + "name": "Aruser@s: Episodio 1454", + "startDate": "2025-05-30T09:00:00+02:00", + "endDate": "2025-05-30T11:00:00+02:00", "publishedOn": { "@type": "BroadcastService", "name": "La Sexta" @@ -152,9 +153,9 @@ "position": 6, "item": { "@type": "BroadcastEvent", - "name": "laSexta Noticias", - "startDate": "2025-01-23T14:30:00+01:00", - "endDate": "2025-01-23T15:00:00+01:00", + "name": "Al rojo vivo: Episodio 3605", + "startDate": "2025-05-30T11:00:00+02:00", + "endDate": "2025-05-30T14:30:00+02:00", "publishedOn": { "@type": "BroadcastService", "name": "La Sexta" @@ -166,9 +167,9 @@ "position": 7, "item": { "@type": "BroadcastEvent", - "name": "Jugones", - "startDate": "2025-01-23T15:00:00+01:00", - "endDate": "2025-01-23T15:40:00+01:00", + "name": "laSexta Noticias", + "startDate": "2025-05-30T14:30:00+02:00", + "endDate": "2025-05-30T15:00:00+02:00", "publishedOn": { "@type": "BroadcastService", "name": "La Sexta" @@ -180,9 +181,9 @@ "position": 8, "item": { "@type": "BroadcastEvent", - "name": "laSexta Meteo", - "startDate": "2025-01-23T15:40:00+01:00", - "endDate": "2025-01-23T15:45:00+01:00", + "name": "Jugones", + "startDate": "2025-05-30T15:00:00+02:00", + "endDate": "2025-05-30T15:40:00+02:00", "publishedOn": { "@type": "BroadcastService", "name": "La Sexta" @@ -194,9 +195,9 @@ "position": 9, "item": { "@type": "BroadcastEvent", - "name": "Zapeando: Episodio 2782", - "startDate": "2025-01-23T15:45:00+01:00", - "endDate": "2025-01-23T17:15:00+01:00", + "name": "laSexta Meteo", + "startDate": "2025-05-30T15:40:00+02:00", + "endDate": "2025-05-30T15:45:00+02:00", "publishedOn": { "@type": "BroadcastService", "name": "La Sexta" @@ -208,9 +209,9 @@ "position": 10, "item": { "@type": "BroadcastEvent", - "name": "Más vale tarde: Episodio 595", - "startDate": "2025-01-23T17:15:00+01:00", - "endDate": "2025-01-23T20:00:00+01:00", + "name": "Zapeando: Episodio 2866", + "startDate": "2025-05-30T15:45:00+02:00", + "endDate": "2025-05-30T17:15:00+02:00", "publishedOn": { "@type": "BroadcastService", "name": "La Sexta" @@ -222,9 +223,9 @@ "position": 11, "item": { "@type": "BroadcastEvent", - "name": "laSexta Noticias", - "startDate": "2025-01-23T20:00:00+01:00", - "endDate": "2025-01-23T21:00:00+01:00", + "name": "Más vale tarde: Episodio 683", + "startDate": "2025-05-30T17:15:00+02:00", + "endDate": "2025-05-30T20:00:00+02:00", "publishedOn": { "@type": "BroadcastService", "name": "La Sexta" @@ -236,9 +237,9 @@ "position": 12, "item": { "@type": "BroadcastEvent", - "name": "laSexta Clave", - "startDate": "2025-01-23T21:00:00+01:00", - "endDate": "2025-01-23T21:20:00+01:00", + "name": "laSexta Noticias", + "startDate": "2025-05-30T20:00:00+02:00", + "endDate": "2025-05-30T21:00:00+02:00", "publishedOn": { "@type": "BroadcastService", "name": "La Sexta" @@ -250,9 +251,9 @@ "position": 13, "item": { "@type": "BroadcastEvent", - "name": "laSexta Meteo", - "startDate": "2025-01-23T21:20:00+01:00", - "endDate": "2025-01-23T21:25:00+01:00", + "name": "laSexta Clave", + "startDate": "2025-05-30T21:00:00+02:00", + "endDate": "2025-05-30T21:20:00+02:00", "publishedOn": { "@type": "BroadcastService", "name": "La Sexta" @@ -264,9 +265,9 @@ "position": 14, "item": { "@type": "BroadcastEvent", - "name": "laSexta Deportes", - "startDate": "2025-01-23T21:25:00+01:00", - "endDate": "2025-01-23T21:30:00+01:00", + "name": "laSexta Meteo", + "startDate": "2025-05-30T21:20:00+02:00", + "endDate": "2025-05-30T21:25:00+02:00", "publishedOn": { "@type": "BroadcastService", "name": "La Sexta" @@ -278,9 +279,9 @@ "position": 15, "item": { "@type": "BroadcastEvent", - "name": "El intermedio: Episodio 380", - "startDate": "2025-01-23T21:30:00+01:00", - "endDate": "2025-01-23T22:30:00+01:00", + "name": "laSexta Deportes", + "startDate": "2025-05-30T21:25:00+02:00", + "endDate": "2025-05-30T21:30:00+02:00", "publishedOn": { "@type": "BroadcastService", "name": "La Sexta" @@ -292,9 +293,9 @@ "position": 16, "item": { "@type": "BroadcastEvent", - "name": "Conspiranoicos: Episodio 13", - "startDate": "2025-01-23T22:30:00+01:00", - "endDate": "2025-01-24T01:45:00+01:00", + "name": "laSexta Columna: China: tu amigo agridulce", + "startDate": "2025-05-30T21:30:00+02:00", + "endDate": "2025-05-30T22:30:00+02:00", "publishedOn": { "@type": "BroadcastService", "name": "La Sexta" @@ -306,9 +307,9 @@ "position": 17, "item": { "@type": "BroadcastEvent", - "name": "Equipo de investigación", - "startDate": "2025-01-24T01:45:00+01:00", - "endDate": "2025-01-24T03:00:00+01:00", + "name": "Equipo de investigación: El mercado negro del cobre", + "startDate": "2025-05-30T22:30:00+02:00", + "endDate": "2025-05-30T23:45:00+02:00", "publishedOn": { "@type": "BroadcastService", "name": "La Sexta" @@ -320,9 +321,9 @@ "position": 18, "item": { "@type": "BroadcastEvent", - "name": "Pokerstars casino", - "startDate": "2025-01-24T03:00:00+01:00", - "endDate": "2025-01-24T03:40:00+01:00", + "name": "Equipo de investigación", + "startDate": "2025-05-30T23:45:00+02:00", + "endDate": "2025-05-31T01:30:00+02:00", "publishedOn": { "@type": "BroadcastService", "name": "La Sexta" @@ -334,9 +335,9 @@ "position": 19, "item": { "@type": "BroadcastEvent", - "name": "Galería del coleccionista", - "startDate": "2025-01-24T03:40:00+01:00", - "endDate": "2025-01-24T04:31:00+01:00", + "name": "Equipo de investigación", + "startDate": "2025-05-31T01:30:00+02:00", + "endDate": "2025-05-31T02:45:00+02:00", "publishedOn": { "@type": "BroadcastService", "name": "La Sexta" @@ -348,9 +349,51 @@ "position": 20, "item": { "@type": "BroadcastEvent", - "name": "Minutos musicales", - "startDate": "2025-01-24T04:31:00+01:00", - "endDate": "2025-01-24T06:00:00+01:00", + "name": "Pokerstars casino", + "startDate": "2025-05-31T02:45:00+02:00", + "endDate": "2025-05-31T03:25:00+02:00", + "publishedOn": { + "@type": "BroadcastService", + "name": "La Sexta" + } + } + }, + { + "@type": "ListItem", + "position": 21, + "item": { + "@type": "BroadcastEvent", + "name": "Vivara: gestionamos tu alquiler", + "startDate": "2025-05-31T03:25:00+02:00", + "endDate": "2025-05-31T03:40:00+02:00", + "publishedOn": { + "@type": "BroadcastService", + "name": "La Sexta" + } + } + }, + { + "@type": "ListItem", + "position": 22, + "item": { + "@type": "BroadcastEvent", + "name": "Galería del coleccionista", + "startDate": "2025-05-31T03:40:00+02:00", + "endDate": "2025-05-31T04:40:00+02:00", + "publishedOn": { + "@type": "BroadcastService", + "name": "La Sexta" + } + } + }, + { + "@type": "ListItem", + "position": 23, + "item": { + "@type": "BroadcastEvent", + "name": "Venta Prime", + "startDate": "2025-05-31T04:40:00+02:00", + "endDate": "2025-05-31T06:40:00+02:00", "publishedOn": { "@type": "BroadcastService", "name": "La Sexta" @@ -387,14 +430,14 @@ ] } - - - - - - - - + + + + + + + + - - + + - - + + @@ -451,15 +494,12 @@ function OptanonWrapper() { console.log('OptanonWrapper'); }
  • Fútbol
  • -
  • - Tenis -
  • -
  • - Rugby -
  • Calendario deportivo
  • +
  • + Tenis +
  • Baloncesto
  • @@ -467,10 +507,7 @@ function OptanonWrapper() { console.log('OptanonWrapper'); } NBA
  • - Deportes -
  • -
  • - NFL + Deportes
  • Documentales @@ -478,6 +515,9 @@ function OptanonWrapper() { console.log('OptanonWrapper'); }
  • Programas
  • +
  • + Cortos +
  • Infantil
  • @@ -490,6 +530,9 @@ function OptanonWrapper() { console.log('OptanonWrapper'); }
  • Bono Cultural Joven
  • +
  • + Rugby +
  • @@ -511,7 +554,7 @@ function OptanonWrapper() { console.log('OptanonWrapper'); }
    - +
    Filtrar
    @@ -524,7 +567,10 @@ function OptanonWrapper() { console.log('OptanonWrapper'); }
    -

    Programación TV. Jueves 23 de enero +

    Programación + de La Sexta + hoy

    +
    @@ -533,17 +579,17 @@ function OptanonWrapper() { console.log('OptanonWrapper'); }
    -
  • - -
    - -
    -
    -
  • - -
    - -
    -
  • -
  • - -
    - -
    -
    -
  • - -
    - -
    -
    -
  • - -
    - -
    -
    -
  • - -
    - -
    -
    -
  • - -
    - -
    -
    -
  • - -
    - -
    -
  • +
  • + +
    + +
    +
    +
  • + +
    + +
    +
    +
  • + +
    + +
    +
    +
  • + +
    + +
    +
    +
  • + +
    + +
    +
  • -
  • - -
    - -
    -
  • +
  • + +
    + +
    +
  • @@ -696,12 +724,30 @@ function OptanonWrapper() { console.log('OptanonWrapper'); }
    +
  • + +
    + +
    +
  • +
  • + +
    + +
    +
    +
  • + +
    + +
    +
  • @@ -720,18 +766,18 @@ function OptanonWrapper() { console.log('OptanonWrapper'); }
    -
  • - -
    - -
    -
  • +
  • + +
    + +
    +
  • @@ -741,13 +787,13 @@ function OptanonWrapper() { console.log('OptanonWrapper'); }
  • - +
  • - +
    - +
  • @@ -756,30 +802,12 @@ function OptanonWrapper() { console.log('OptanonWrapper'); }
  • -
  • - -
    - -
    -
  • -
  • - -
    - -
    -
    -
  • - -
    - -
    -
  • @@ -936,12 +964,6 @@ function OptanonWrapper() { console.log('OptanonWrapper'); }
    -
  • - -
    - -
    -
  • @@ -1200,12 +1222,6 @@ function OptanonWrapper() { console.log('OptanonWrapper'); }
    -
  • - -
    - -
    -
  • @@ -1326,18 +1342,18 @@ function OptanonWrapper() { console.log('OptanonWrapper'); }
    -
  • - -
    - -
    -
  • +
  • + +
    + +
    +
  • @@ -1362,6 +1378,12 @@ function OptanonWrapper() { console.log('OptanonWrapper'); }
    +
  • + +
    + +
    +
  • @@ -1404,18 +1426,18 @@ function OptanonWrapper() { console.log('OptanonWrapper'); }
    -
  • - -
    - -
    -
  • +
  • + +
    + +
    +
  • @@ -1482,6 +1504,36 @@ function OptanonWrapper() { console.log('OptanonWrapper'); }
    +
  • + +
    + +
    +
    +
  • + +
    + +
    +
    +
  • + +
    + +
    +
    +
  • + +
    + +
    +
    +
  • + +
    + +
    +
  • @@ -1495,63 +1547,9 @@ function OptanonWrapper() { console.log('OptanonWrapper'); }
  • - +
    - -
    -
    -
  • - -
    - -
    -
    -
  • - -
    - -
    -
    -
  • - -
    - -
    -
    -
  • - -
    - -
    -
    -
  • - -
    - -
    -
    -
  • - -
    - -
    -
    -
  • - -
    - -
    -
    -
  • - -
    - -
    -
    -
  • - -
    - +
  • @@ -1590,18 +1588,18 @@ function OptanonWrapper() { console.log('OptanonWrapper'); }
  • -
  • - -
    - -
    -
  • +
  • + +
    + +
    +
  • @@ -1615,9 +1613,15 @@ function OptanonWrapper() { console.log('OptanonWrapper'); }
  • - +
    - + +
    +
    +
  • + +
    +
  • @@ -1626,6 +1630,30 @@ function OptanonWrapper() { console.log('OptanonWrapper'); } +
  • + +
    + +
    +
    +
  • + +
    + +
    +
    +
  • + +
    + +
    +
    +
  • + +
    + +
    +
  • @@ -1661,20 +1689,37 @@ function OptanonWrapper() { console.log('OptanonWrapper'); }
  • - 06:00 + 05:15
  • -
    - + + -
    - + -
    - + -
    - + -
    - - - - - - - - - - - - - - + + + + + + + + + + + + + + diff --git a/sites/movistarplus.es/__data__/program1.html b/sites/movistarplus.es/__data__/program1.html new file mode 100644 index 00000000..174a4453 --- /dev/null +++ b/sites/movistarplus.es/__data__/program1.html @@ -0,0 +1,778 @@ + + + + + + Venta Prime (2024) | Movistar Plus+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + +
    + + + +
    + +
    +
    + + +
    +
    +
    +
    +
    + + Logo Movistar Plus+ + +
    +
    +
    + + + + +
    + Venta Prime +
    + +
    +
    +

    Venta Prime

    +

    Ventaprime

    +
    +
    +
    +
    + +
    +
    +
    + + +
    +
    +
    +
    +
    +
    +
    +
    + Venta Prime +
    +
    +
    Duración
    0:00' +
    +
    Confiesa que te gusta
    + + + + + + +
    +
    +
    +
    +

    Valoración de usuarios

    +
    +
    + 5 + 4 + 3 + 2 + 1 +
    +
    + 3 + 180 + votos +
    +
    + + +
    +
    +
    +
    +
    +
    + +
    +
    + + + Suscribirme ahora + +
    + + + + + + + + + + + + + + + + Incluido en suscripción de 9,99€ +
    +
    +
    + +
    +
    +
    +
    +

    Sinopsis

    +
    +
    +
    +

    Espacio de televenta.

    +
    +

    Ver más

    +
    +
    +
    +
    +

    Info

    +
    +
      +
    +

    Televenta

    (2024)

    +
    +
    +

    Calificación

    +
    + Apto para todos los públicos +
    +
    +
    +
    +
    +
    + +
    +
    +
    + + + + + + + + + + + + + + diff --git a/sites/movistarplus.es/__data__/program2.html b/sites/movistarplus.es/__data__/program2.html new file mode 100644 index 00000000..2bd0a88e --- /dev/null +++ b/sites/movistarplus.es/__data__/program2.html @@ -0,0 +1,809 @@ + + + + + + Pokerstars casino (2022) | Movistar Plus+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + +
    + + + +
    + +
    +
    + + +
    +
    +
    +
    +
    + + Logo Movistar Plus+ + +
    +
    +
    + + + + +
    + Pokerstars casino +
    + +
    +
    +

    Pokerstars casino

    +
    +
    +
    +
    +
    + +
    +
    +
    + + +
    +
    +
    +
    +
    +
    +
    +
    + Pokerstars casino +
    +
    +
    Duración
    0:00' +
    +
    Confiesa que te gusta
    + + + + + + +
    +
    +
    +
    +

    Valoración de usuarios

    +
    +
    + 5 + 4 + 3 + 2 + 1 +
    +
    + 3 + 107 + votos +
    +
    + + +
    +
    +
    +
    +
    +
    + +
    +
    + + + Suscribirme ahora + +
    + + + + + + + + + + + + + + + + Incluido en suscripción de 9,99€ +
    +
    +
    + +
    +
    +
    +
    +

    Sinopsis

    +
    +
    +
    +

    El programa trae cada día toda la emoción de su ruleta en vivo, Spin & Win, una versión exclusiva del clásico juego de casino.

    +
    +

    Ver más

    +
    +
    +
    +
    +

    Info

    +
    +
      +
    +

    Programa deportes

    España (2022)

    +
    +
    +

    Calificación

    +
    + No recomendado para menores de dieciocho años +
    +
    +
    +
    +
    +
    +
    +
    +
    +

    Equipo Técnico

    +
    +
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    +

    Presentador

    +

    Paco González

    +
    +
    +
    +
    + +
    +
    +
    + + + + + + + + + + + + + + diff --git a/sites/movistarplus.es/movistarplus.es.config.js b/sites/movistarplus.es/movistarplus.es.config.js index 0200794f..c58b5190 100644 --- a/sites/movistarplus.es/movistarplus.es.config.js +++ b/sites/movistarplus.es/movistarplus.es.config.js @@ -6,21 +6,40 @@ module.exports = { site: 'movistarplus.es', days: 2, url({ channel, date }) { - return `https://www.movistarplus.es/programacion-tv/${channel.site_id}/${date.format( - 'YYYY-MM-DD' - )}` + return `https://www.movistarplus.es/programacion-tv/${channel.site_id}/${date.format('YYYY-MM-DD')}` }, - parser({ content }) { + async parser({ content }) { let programs = [] let items = parseItems(content) if (!items.length) return programs - items.forEach(el => { + + const $ = cheerio.load(content) + const programElements = $('div[id^="ele-"]').get() + + for (let i = 0; i < items.length; i++) { + const el = items[i] + let description = null + + if (programElements[i]) { + const programDiv = $(programElements[i]) + const programLink = programDiv.find('a').attr('href') + + if (programLink) { + const idMatch = programLink.match(/id=(\d+)/) + if (idMatch && idMatch[1]) { + description = await getProgramDescription(programLink).catch(() => null) + } + } + } + programs.push({ title: el.item.name, + description: description, start: dayjs(el.item.startDate), stop: dayjs(el.item.endDate) }) - }) + } + return programs }, async channels() { @@ -58,3 +77,21 @@ function parseItems(content) { return [] } } + +async function getProgramDescription(programUrl) { + try { + const response = await axios.get(programUrl, { + headers: { + 'Referer': 'https://www.movistarplus.es/programacion-tv/' + } + }) + + const $ = cheerio.load(response.data) + const description = $('.show-content .text p').first().text().trim() || null + + return description + } catch (error) { + console.error(`Error fetching description from ${programUrl}:`, error.message) + return null + } +} diff --git a/sites/movistarplus.es/movistarplus.es.test.js b/sites/movistarplus.es/movistarplus.es.test.js index 7d4bb220..2e288d15 100644 --- a/sites/movistarplus.es/movistarplus.es.test.js +++ b/sites/movistarplus.es/movistarplus.es.test.js @@ -6,8 +6,10 @@ const utc = require('dayjs/plugin/utc') const customParseFormat = require('dayjs/plugin/customParseFormat') dayjs.extend(customParseFormat) dayjs.extend(utc) +const axios = require('axios') +jest.mock('axios') -const date = dayjs.utc('2025-01-23', 'YYYY-MM-DD').startOf('d') +const date = dayjs.utc('2025-05-30', 'YYYY-MM-DD').startOf('d') const channel = { site_id: 'sexta', xmltv_id: 'LaSexta.es' @@ -15,36 +17,64 @@ const channel = { it('can generate valid url', () => { expect(url({ channel, date })).toBe( - 'https://www.movistarplus.es/programacion-tv/sexta/2025-01-23' + 'https://www.movistarplus.es/programacion-tv/sexta/2025-05-30' ) }) -it('can parse response', () => { +it('can parse response', async () => { const content = fs.readFileSync(path.resolve(__dirname, '__data__/content.html')) - const results = parser({ content, date }).map(p => { + + axios.get.mockImplementation(url => { + if ( + url === + 'https://www.movistarplus.es/entretenimiento/venta-prime-t1/ficha?tipo=E&id=3414523' + ) { + return Promise.resolve({ + data: fs.readFileSync(path.resolve(__dirname, '__data__/program1.html')) + }) + } else if ( + url === + 'https://www.movistarplus.es/deportes/programa/pokerstars-casino-1/ficha?tipo=E&id=2057641' + ) { + return Promise.resolve({ + data: fs.readFileSync(path.resolve(__dirname, '__data__/program2.html')) + }) + } else { + return Promise.resolve({ data: '' }) + } + }) + + let results = await parser({ content, date }) + results = results.map(p => { p.start = p.start.toJSON() p.stop = p.stop.toJSON() return p }) - expect(results.length).toBe(20) + expect(results.length).toBe(23) expect(results[0]).toMatchObject({ - start: '2025-01-23T05:00:00.000Z', - stop: '2025-01-23T05:45:00.000Z', - title: 'Venta Prime' + start: '2025-05-30T03:15:00.000Z', + stop: '2025-05-30T04:25:00.000Z', + title: 'Venta Prime', + description: + 'Espacio de televenta.' }) expect(results[19]).toMatchObject({ - start: '2025-01-24T03:31:00.000Z', - stop: '2025-01-24T05:00:00.000Z', - title: 'Minutos musicales' + start: '2025-05-31T00:45:00.000Z', + stop: '2025-05-31T01:25:00.000Z', + title: 'Pokerstars casino', + description: + 'El programa trae cada día toda la emoción de su ruleta en vivo, Spin & Win, una versión exclusiva del clásico juego de casino.' }) }) -it('can handle empty guide', () => { - const result = parser({ + +it('can handle empty guide', async () => { + const results = await parser({ date, - channel, - content: '' + channel, + content: '[]' }) - expect(result).toMatchObject([]) + + expect(results).toMatchObject([]) })