mirror of
https://github.com/iptv-org/epg.git
synced 2025-05-11 01:20:08 -04:00
commit
f8ce1a6ef7
2 changed files with 8 additions and 15 deletions
|
@ -1,21 +1,14 @@
|
|||
const axios = require('axios')
|
||||
const dayjs = require('dayjs')
|
||||
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)
|
||||
const { DateTime } = require('luxon')
|
||||
|
||||
module.exports = {
|
||||
site: 'wavve.com',
|
||||
days: 2,
|
||||
maxConnections: 200,
|
||||
url: function ({ channel, date }) {
|
||||
return `https://apis.pooq.co.kr/live/epgs/channels/${channel.site_id}?startdatetime=${date
|
||||
.tz('Asia/Seoul')
|
||||
.format('YYYY-MM-DD')}%2000%3A00&enddatetime=${date
|
||||
.tz('Asia/Seoul')
|
||||
return `https://apis.pooq.co.kr/live/epgs/channels/${
|
||||
channel.site_id
|
||||
}?startdatetime=${date.format('YYYY-MM-DD')}%2000%3A00&enddatetime=${date
|
||||
.add(1, 'd')
|
||||
.format('YYYY-MM-DD')}%2000%3A00&apikey=E5F3E0D30947AA5440556471321BB6D9&limit=500`
|
||||
},
|
||||
|
@ -55,11 +48,11 @@ module.exports = {
|
|||
}
|
||||
|
||||
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) {
|
||||
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) {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// npm run channels:parse -- --config=sites/wavve.com/wavve.com.config.js --output=sites/wavve.com/wavve.com.channels.xml
|
||||
// npx epg-grabber --config=sites/wavve.com/wavve.com.config.js --channels=sites/wavve.com/wavve.com.channels.xml --output=guide.xml --days=2
|
||||
// npx epg-grabber --config=sites/wavve.com/wavve.com.config.js --channels=sites/wavve.com/wavve.com.channels.xml --output=guide.xml
|
||||
|
||||
const { parser, url } = require('./wavve.com.config.js')
|
||||
const dayjs = require('dayjs')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue