mirror of
https://github.com/iptv-org/epg.git
synced 2025-05-10 09:00:07 -04:00
Update tv24.se.config.js
This commit is contained in:
parent
ec754d2825
commit
79e7d04e01
1 changed files with 31 additions and 1 deletions
|
@ -34,6 +34,9 @@ module.exports = {
|
||||||
actors: details.actors,
|
actors: details.actors,
|
||||||
icon: details.icon,
|
icon: details.icon,
|
||||||
category: details.category,
|
category: details.category,
|
||||||
|
sub_title: details.sub_title,
|
||||||
|
season: details.season,
|
||||||
|
episode: details.episode,
|
||||||
start,
|
start,
|
||||||
stop
|
stop
|
||||||
})
|
})
|
||||||
|
@ -88,7 +91,10 @@ async function loadProgramDetails($item) {
|
||||||
icon: parseIcon($),
|
icon: parseIcon($),
|
||||||
actors: parseActors($),
|
actors: parseActors($),
|
||||||
description: parseDescription($),
|
description: parseDescription($),
|
||||||
category: parseCategory($)
|
category: parseCategory($),
|
||||||
|
sub_title: parseSubTitle($),
|
||||||
|
season: parseSeason($),
|
||||||
|
episode: parseEpisode($)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -99,6 +105,30 @@ function parseIcon($) {
|
||||||
return url
|
return url
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function parseSeason($) {
|
||||||
|
const [_, season] = $('.sub-title')
|
||||||
|
.text()
|
||||||
|
.trim()
|
||||||
|
.match(/Säsong (\d+)/) || [null, '']
|
||||||
|
|
||||||
|
return parseInt(season)
|
||||||
|
}
|
||||||
|
|
||||||
|
function parseEpisode($) {
|
||||||
|
const [_, episode] = $('.sub-title')
|
||||||
|
.text()
|
||||||
|
.trim()
|
||||||
|
.match(/Avsnitt (\d+)/) || [null, '']
|
||||||
|
|
||||||
|
return parseInt(episode)
|
||||||
|
}
|
||||||
|
|
||||||
|
function parseSubTitle($) {
|
||||||
|
const [_, subtitle] = $('.sub-title').text().trim().split(': ')
|
||||||
|
|
||||||
|
return subtitle
|
||||||
|
}
|
||||||
|
|
||||||
function parseCategory($) {
|
function parseCategory($) {
|
||||||
return $('.extras > dt:contains(Kategori)').next().text().trim().split(' / ')
|
return $('.extras > dt:contains(Kategori)').next().text().trim().split(' / ')
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue