mirror of
https://github.com/iptv-org/epg.git
synced 2025-05-10 00:50:09 -04:00
Update wavve.com.config.js
This commit is contained in:
parent
081a84dd39
commit
f479e0c401
1 changed files with 7 additions and 14 deletions
|
@ -1,21 +1,14 @@
|
||||||
const axios = require('axios')
|
const axios = require('axios')
|
||||||
const dayjs = require('dayjs')
|
const { DateTime } = require('luxon')
|
||||||
const utc = require('dayjs/plugin/utc')
|
|
||||||
const timezone = require('dayjs/plugin/timezone')
|
|
||||||
const customParseFormat = require('dayjs/plugin/customParseFormat')
|
|
||||||
|
|
||||||
dayjs.extend(utc)
|
|
||||||
dayjs.extend(timezone)
|
|
||||||
dayjs.extend(customParseFormat)
|
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
site: 'wavve.com',
|
site: 'wavve.com',
|
||||||
days: 2,
|
days: 2,
|
||||||
|
maxConnections: 200,
|
||||||
url: function ({ channel, date }) {
|
url: function ({ channel, date }) {
|
||||||
return `https://apis.pooq.co.kr/live/epgs/channels/${channel.site_id}?startdatetime=${date
|
return `https://apis.pooq.co.kr/live/epgs/channels/${
|
||||||
.tz('Asia/Seoul')
|
channel.site_id
|
||||||
.format('YYYY-MM-DD')}%2000%3A00&enddatetime=${date
|
}?startdatetime=${date.format('YYYY-MM-DD')}%2000%3A00&enddatetime=${date
|
||||||
.tz('Asia/Seoul')
|
|
||||||
.add(1, 'd')
|
.add(1, 'd')
|
||||||
.format('YYYY-MM-DD')}%2000%3A00&apikey=E5F3E0D30947AA5440556471321BB6D9&limit=500`
|
.format('YYYY-MM-DD')}%2000%3A00&apikey=E5F3E0D30947AA5440556471321BB6D9&limit=500`
|
||||||
},
|
},
|
||||||
|
@ -55,11 +48,11 @@ module.exports = {
|
||||||
}
|
}
|
||||||
|
|
||||||
function parseStart(item) {
|
function parseStart(item) {
|
||||||
return dayjs.tz(item.starttime, 'YYYY-MM-DD HH:mm', 'Asia/Seoul')
|
return DateTime.fromFormat(item.starttime, 'yyyy-MM-dd HH:mm', { zone: 'Asia/Seoul' }).toUTC()
|
||||||
}
|
}
|
||||||
|
|
||||||
function parseStop(item) {
|
function parseStop(item) {
|
||||||
return dayjs.tz(item.endtime, 'YYYY-MM-DD HH:mm', 'Asia/Seoul')
|
return DateTime.fromFormat(item.endtime, 'yyyy-MM-dd HH:mm', { zone: 'Asia/Seoul' }).toUTC()
|
||||||
}
|
}
|
||||||
|
|
||||||
function parseItems(content) {
|
function parseItems(content) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue