From 883779fa7227533818977bfa4bf6ecf862844ba8 Mon Sep 17 00:00:00 2001 From: Kristof Bach Date: Sun, 12 Oct 2025 14:19:40 +0200 Subject: [PATCH 1/3] Update musor.tv selectors --- sites/musor.tv/musor.tv.config.js | 41 +++++++++++++++++-------------- 1 file changed, 23 insertions(+), 18 deletions(-) diff --git a/sites/musor.tv/musor.tv.config.js b/sites/musor.tv/musor.tv.config.js index d645a811..2be25bf1 100644 --- a/sites/musor.tv/musor.tv.config.js +++ b/sites/musor.tv/musor.tv.config.js @@ -3,6 +3,7 @@ const axios = require('axios') const dayjs = require('dayjs') const utc = require('dayjs/plugin/utc') const customParseFormat = require('dayjs/plugin/customParseFormat') +const uniqBy = require('lodash.uniqby') dayjs.extend(utc) dayjs.extend(customParseFormat) @@ -49,38 +50,42 @@ module.exports = { const $ = cheerio.load(html) const channels = $('body > div.big_content > div > nav > table > tbody > tr > td > a').toArray() - return channels - .map(item => { - const $item = $(item) - const url = $item.attr('href') - if (!url.startsWith('//musor.tv/mai/tvmusor/')) return null - const site_id = url.replace('//musor.tv/mai/tvmusor/', '') - return { - lang: 'hu', - site_id, - name: $item.text() - } - }) - .filter(i => i) + + return uniqBy( + channels + .map(item => { + const $item = $(item) + const url = $item.attr('href') + if (!url.startsWith('//musor.tv/mai/tvmusor/')) return null + const site_id = url.replace('//musor.tv/mai/tvmusor/', '') + return { + lang: 'hu', + site_id, + name: $item.text() + } + }) + .filter(i => i), + 'site_id' + ) } } function parseImage($item) { - const imgSrc = $item.find('div.smartpe_screenshot > img').attr('src') + const imgSrc = $item.find('div.progentry_screenshot > img').attr('src') return imgSrc ? `https:${imgSrc}` : null } function parseTitle($item) { - return $item.find('div:nth-child(2) > div > h3 > a').text().trim() + return $item.find('h3 > a').text().trim() } function parseDescription($item) { - return $item.find('div:nth-child(5) > div > div').text().trim() + return $item.find('div.progentrylong').text().trim() } function parseStart($item) { - let datetime = $item.find('div:nth-child(1) > div > div > div > div > time').attr('content') + let datetime = $item.find('time').attr('content') if (!datetime) return null return dayjs.utc(datetime.replace('GMT', 'T'), 'YYYY-MM-DDTHH:mm:ss') @@ -89,5 +94,5 @@ function parseStart($item) { function parseItems(content) { const $ = cheerio.load(content) - return [$, $('div.multicolumndayprogarea > div.smartpe_progentry').toArray()] + return [$, $('div.progarea > div.progentry > div.progentry_internal').toArray()] } From 4885268567da2a8d3f877a5d3eac22d291319a6f Mon Sep 17 00:00:00 2001 From: Kristof Bach Date: Sun, 12 Oct 2025 14:20:47 +0200 Subject: [PATCH 2/3] Update musor.tv channel list --- sites/musor.tv/musor.tv.channels.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sites/musor.tv/musor.tv.channels.xml b/sites/musor.tv/musor.tv.channels.xml index 0ff172ab..cb9bdcc5 100644 --- a/sites/musor.tv/musor.tv.channels.xml +++ b/sites/musor.tv/musor.tv.channels.xml @@ -19,11 +19,13 @@ Trace Urban (HD) Travel XP (HD) 360 TuneBox + ATV Extra (HD) + AXN (HD) Cartoonito + Csukás Meserádió Dankó Rádió Debrecen TV Duck TV HD - Duna World Rádió Első Kerület TV HD Fashion TV Filmbox (HD) @@ -41,6 +43,7 @@ Nemzetiségi Adások Nemzeti Sport Rádió MTV Hungary + Neshama TV Nickelodeon HD PestBuda TV HD RTL HÁROM (HD) @@ -59,9 +62,7 @@ Apostol TV Arena4 (HD) ATV (HD) - ATV Spirit (HD) Auto Motor Sport (HD) - AXN (HD) Baby TV Balaton TV BBC Earth (HD) @@ -105,7 +106,6 @@ Funbox UltraHD 4K Galaxy 4 (HD) Gametoon (HD) - Hatoscsatorna HBO 2 (HD) HBO 3 (HD) Hegyvidék TV From ee0d4c367ea3b57487b5ffd60756e1529b414abf Mon Sep 17 00:00:00 2001 From: Kristof Bach Date: Sun, 12 Oct 2025 14:44:12 +0200 Subject: [PATCH 3/3] Update tests for musor.tv --- sites/musor.tv/__data__/content.html | 2440 ++++++++++++-------------- sites/musor.tv/musor.tv.test.js | 27 +- 2 files changed, 1127 insertions(+), 1340 deletions(-) diff --git a/sites/musor.tv/__data__/content.html b/sites/musor.tv/__data__/content.html index 63573c34..2ccd416a 100644 --- a/sites/musor.tv/__data__/content.html +++ b/sites/musor.tv/__data__/content.html @@ -20,7 +20,7 @@ -Hatoscsatorna tv-műsor - 2022.11.20 | 📺 musor.tv +Magyar Mozi TV (HD) tv-műsor - 2025.10.11 | 📺 musor.tv @@ -28,25 +28,25 @@ - - - + + + - - + + - - - + + + - + + + + @@ -3273,9 +3682,22 @@ SELECT.timezoneselectsmall { })(); - + + + +