mirror of
https://github.com/iptv-org/epg.git
synced 2025-05-11 17:40:07 -04:00
Update hd-plus.de.config.js
This commit is contained in:
parent
9e928c1b87
commit
3828dff5de
1 changed files with 4 additions and 7 deletions
|
@ -11,12 +11,13 @@ dayjs.extend(customParseFormat)
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
lang: 'de',
|
lang: 'de',
|
||||||
|
days: 3,
|
||||||
site: 'hd-plus.de',
|
site: 'hd-plus.de',
|
||||||
channels: 'hd-plus.de.channels.xml',
|
channels: 'hd-plus.de.channels.xml',
|
||||||
output: '.gh-pages/guides/hd-plus.de.guide.xml',
|
output: '.gh-pages/guides/hd-plus.de.guide.xml',
|
||||||
url({ date, channel }) {
|
url({ date, channel }) {
|
||||||
const now = dayjs()
|
const today = dayjs().utc().startOf('d')
|
||||||
const day = now.diff(date, 'd')
|
const day = date.diff(today, 'd')
|
||||||
|
|
||||||
return `https://www.hd-plus.de/epg/channel/${channel.site_id}?d=${day}`
|
return `https://www.hd-plus.de/epg/channel/${channel.site_id}?d=${day}`
|
||||||
},
|
},
|
||||||
|
@ -32,7 +33,7 @@ module.exports = {
|
||||||
items.forEach(item => {
|
items.forEach(item => {
|
||||||
const title = parseTitle(item)
|
const title = parseTitle(item)
|
||||||
let start = parseStart(item, date)
|
let start = parseStart(item, date)
|
||||||
const stop = parseStop(item, date)
|
const stop = start.add(1, 'h')
|
||||||
if (programs.length) {
|
if (programs.length) {
|
||||||
programs[programs.length - 1].stop = start
|
programs[programs.length - 1].stop = start
|
||||||
}
|
}
|
||||||
|
@ -44,10 +45,6 @@ module.exports = {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function parseStop(item, date) {
|
|
||||||
return date.endOf('d')
|
|
||||||
}
|
|
||||||
|
|
||||||
function parseStart(item, date) {
|
function parseStart(item, date) {
|
||||||
let time = (item.querySelector('td:nth-child(2)') || { textContent: '' }).textContent
|
let time = (item.querySelector('td:nth-child(2)') || { textContent: '' }).textContent
|
||||||
time = time.split(' ').pop()
|
time = time.split(' ').pop()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue