mirror of
https://github.com/iptv-org/epg.git
synced 2025-05-10 09:00:07 -04:00
Update tvgid.ua.config.js
This commit is contained in:
parent
9e928c1b87
commit
0852777e59
1 changed files with 3 additions and 6 deletions
|
@ -10,9 +10,9 @@ dayjs.extend(utc)
|
||||||
dayjs.extend(timezone)
|
dayjs.extend(timezone)
|
||||||
dayjs.extend(customParseFormat)
|
dayjs.extend(customParseFormat)
|
||||||
|
|
||||||
let PM = false
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
lang: 'uk',
|
lang: 'uk',
|
||||||
|
days: 3,
|
||||||
site: 'tvgid.ua',
|
site: 'tvgid.ua',
|
||||||
channels: 'tvgid.ua.channels.xml',
|
channels: 'tvgid.ua.channels.xml',
|
||||||
output: '.gh-pages/guides/tvgid.ua.guide.xml',
|
output: '.gh-pages/guides/tvgid.ua.guide.xml',
|
||||||
|
@ -20,6 +20,7 @@ module.exports = {
|
||||||
return `https://tvgid.ua/channels/${channel.site_id}/${date.format('DDMMYYYY')}/tmall/`
|
return `https://tvgid.ua/channels/${channel.site_id}/${date.format('DDMMYYYY')}/tmall/`
|
||||||
},
|
},
|
||||||
parser: function ({ buffer, date }) {
|
parser: function ({ buffer, date }) {
|
||||||
|
let PM = false
|
||||||
const programs = []
|
const programs = []
|
||||||
const items = parseItems(buffer)
|
const items = parseItems(buffer)
|
||||||
items.forEach(item => {
|
items.forEach(item => {
|
||||||
|
@ -28,7 +29,7 @@ module.exports = {
|
||||||
if (!start) return
|
if (!start) return
|
||||||
if (start.hour() > 11) PM = true
|
if (start.hour() > 11) PM = true
|
||||||
if (start.hour() < 12 && PM) start = start.add(1, 'd')
|
if (start.hour() < 12 && PM) start = start.add(1, 'd')
|
||||||
const stop = parseStop(item, start)
|
const stop = start.add(1, 'h')
|
||||||
if (programs.length) {
|
if (programs.length) {
|
||||||
programs[programs.length - 1].stop = start
|
programs[programs.length - 1].stop = start
|
||||||
}
|
}
|
||||||
|
@ -40,10 +41,6 @@ module.exports = {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function parseStop(item, date) {
|
|
||||||
return date.hour(7)
|
|
||||||
}
|
|
||||||
|
|
||||||
function parseStart(item, date) {
|
function parseStart(item, date) {
|
||||||
let time = (item.querySelector('td > table > tbody > tr > td.time') || { textContent: '' })
|
let time = (item.querySelector('td > table > tbody > tr > td.time') || { textContent: '' })
|
||||||
.textContent
|
.textContent
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue