diff --git a/.github/workflows/ena.skylifetv.co.kr.yml b/.github/workflows/ena.skylifetv.co.kr.yml
new file mode 100644
index 00000000..d5fcc618
--- /dev/null
+++ b/.github/workflows/ena.skylifetv.co.kr.yml
@@ -0,0 +1,17 @@
+name: ena.skylifetv.co.kr
+on:
+ schedule:
+ - cron: '0 3 * * *'
+ workflow_dispatch:
+ workflow_run:
+ workflows: [_trigger]
+ types:
+ - completed
+jobs:
+ load:
+ uses: ./.github/workflows/_load.yml
+ with:
+ site: ${{github.workflow}}
+ secrets:
+ APP_ID: ${{ secrets.APP_ID }}
+ APP_PRIVATE_KEY: ${{ secrets.APP_PRIVATE_KEY }}
diff --git a/sites/ena.skylifetv.co.kr/__data__/content.html b/sites/ena.skylifetv.co.kr/__data__/content.html
new file mode 100644
index 00000000..f8dd1e1c
--- /dev/null
+++ b/sites/ena.skylifetv.co.kr/__data__/content.html
@@ -0,0 +1,3274 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ENA [엔터테인먼트 DNA]
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
ENTERTAINMENT DNA ENA
+
+ skyTV의 모든 오리지널을 한 곳에! 다양한 드라마와 예능 라인업으로 매순간 시청자에게 즐거움을 선사합니다.
+
ENA 채널 로고 다운받기
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 채널번호 찾기
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ IPTV
+
+
+
+ IPTV 채널번호
+
+
+
+
+
+ 구분 |
+ 채널번호 |
+ 구분 |
+ 채널번호 |
+
+
+
+
+ Genie TV(KT) |
+ 1 |
+ B tv(SKB) |
+ 40 |
+
+
+ U+ tv(LG) |
+ 72 |
+ |
+ |
+
+
+
+
+
+
+
+ 위성방송
+
+
+
+ 위성방송 채널번호
+
+
+
+
+
+ 구분 |
+ 채널번호 |
+ 구분 |
+ 채널번호 |
+
+
+
+
+ skylife |
+ 1 |
+ |
+ |
+
+
+
+
+
+
+
+ 케이블
+
+
+
+ 케이블 채널번호
+
+
+
+
+
+ 구분 |
+ 채널번호 |
+ 구분 |
+ 채널번호 |
+
+
+
+
+ LG헬로비전 |
+ 45 |
+ 딜라이브(DLIVE) |
+ 58 |
+
+
+ B tv 알뜰 |
+ 57 |
+ 씨엠비(CMB) |
+ 37 |
+
+
+ HCN |
+ 996 |
+ |
+ |
+
+
+
+
+
+
+
+
지역 방송을 시청하시는 분들은 아래 고객센터로 문의 바랍니다.
+
+ LG헬로비전 1588-1000 / 딜라이브 1644-1100 / B tv 알뜰 1877-7000 / CMB 1544-3434 / HCN 1877-8000
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/sites/ena.skylifetv.co.kr/__data__/no_content.html b/sites/ena.skylifetv.co.kr/__data__/no_content.html
new file mode 100644
index 00000000..0ae17cc8
--- /dev/null
+++ b/sites/ena.skylifetv.co.kr/__data__/no_content.html
@@ -0,0 +1,3076 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ENA [엔터테인먼트 DNA]
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
ENTERTAINMENT DNA ENA
+
+ skyTV의 모든 오리지널을 한 곳에! 다양한 드라마와 예능 라인업으로 매순간 시청자에게 즐거움을 선사합니다.
+
ENA 채널 로고 다운받기
+
+
+
+
+
+
+
+
+
+
+
+
+ 편성표
+
+
+
+

+

+
+
+
+
+ 편성표
+
+
+ 시간 |
+ 프로그램 정보 |
+ 장애인 |
+ 등급 |
+ 시간 |
+
+
+
+
+
+
+
편성표 자세히 보기
+
+
+
+
+
+
+ 채널번호 찾기
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ IPTV
+
+
+
+ IPTV 채널번호
+
+
+
+
+
+ 구분 |
+ 채널번호 |
+ 구분 |
+ 채널번호 |
+
+
+
+
+ Genie TV(KT) |
+ 1 |
+ B tv(SKB) |
+ 40 |
+
+
+ U+ tv(LG) |
+ 72 |
+ |
+ |
+
+
+
+
+
+
+
+ 위성방송
+
+
+
+ 위성방송 채널번호
+
+
+
+
+
+ 구분 |
+ 채널번호 |
+ 구분 |
+ 채널번호 |
+
+
+
+
+ skylife |
+ 1 |
+ |
+ |
+
+
+
+
+
+
+
+ 케이블
+
+
+
+ 케이블 채널번호
+
+
+
+
+
+ 구분 |
+ 채널번호 |
+ 구분 |
+ 채널번호 |
+
+
+
+
+ LG헬로비전 |
+ 45 |
+ 딜라이브(DLIVE) |
+ 58 |
+
+
+ B tv 알뜰 |
+ 57 |
+ 씨엠비(CMB) |
+ 37 |
+
+
+ HCN |
+ 996 |
+ |
+ |
+
+
+
+
+
+
+
+
지역 방송을 시청하시는 분들은 아래 고객센터로 문의 바랍니다.
+
+ LG헬로비전 1588-1000 / 딜라이브 1644-1100 / B tv 알뜰 1877-7000 / CMB 1544-3434 / HCN 1877-8000
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/sites/ena.skylifetv.co.kr/ena.skylifetv.co.kr.channels.xml b/sites/ena.skylifetv.co.kr/ena.skylifetv.co.kr.channels.xml
new file mode 100644
index 00000000..a01dc207
--- /dev/null
+++ b/sites/ena.skylifetv.co.kr/ena.skylifetv.co.kr.channels.xml
@@ -0,0 +1,11 @@
+
+
+
+ ENA
+ ENA PLAY
+ kids talk talk plus
+ OLIFE
+ ONCE
+ skyUHD
+
+
diff --git a/sites/ena.skylifetv.co.kr/ena.skylifetv.co.kr.config.js b/sites/ena.skylifetv.co.kr/ena.skylifetv.co.kr.config.js
new file mode 100644
index 00000000..86e3791f
--- /dev/null
+++ b/sites/ena.skylifetv.co.kr/ena.skylifetv.co.kr.config.js
@@ -0,0 +1,68 @@
+const cheerio = require('cheerio')
+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)
+
+module.exports = {
+ site: 'ena.skylifetv.co.kr',
+ days: 2,
+ url({ channel, date }) {
+ return `http://ena.skylifetv.co.kr/${channel.site_id}/?day=${date.format('YYYYMMDD')}&sc_dvsn=U`
+ },
+ parser({ content, date }) {
+ const programs = []
+ const items = parseItems(content, date)
+ items.forEach(item => {
+ const $item = cheerio.load(item)
+ const start = parseStart($item, date)
+ const duration = parseDuration($item)
+ const stop = start.add(duration, 'm')
+ programs.push({
+ title: parseTitle($item),
+ rating: parseRating($item),
+ start,
+ stop
+ })
+ })
+
+ return programs
+ }
+}
+
+function parseTitle($item) {
+ return $item('.col2 > .tit').text().trim()
+}
+
+function parseRating($item) {
+ const rating = $item('.col4').text().trim()
+
+ return rating
+ ? {
+ system: 'KMRB',
+ value: rating
+ }
+ : null
+}
+
+function parseDuration($item) {
+ const duration = $item('.col5').text().trim()
+
+ return duration ? parseInt(duration) : 30
+}
+
+function parseStart($item, date) {
+ const time = $item('.col1').text().trim()
+
+ return dayjs.tz(`${date.format('YYYY-MM-DD')} ${time}`, 'YYYY-MM-DD HH:mm', 'Asia/Seoul')
+}
+
+function parseItems(content, channel, date) {
+ const $ = cheerio.load(content)
+
+ return $('.tbl_schedule > tbody > tr').toArray()
+}
diff --git a/sites/ena.skylifetv.co.kr/ena.skylifetv.co.kr.test.js b/sites/ena.skylifetv.co.kr/ena.skylifetv.co.kr.test.js
new file mode 100644
index 00000000..ecf7e5ae
--- /dev/null
+++ b/sites/ena.skylifetv.co.kr/ena.skylifetv.co.kr.test.js
@@ -0,0 +1,59 @@
+// npx epg-grabber --config=sites/ena.skylifetv.co.kr/ena.skylifetv.co.kr.config.js --channels=sites/ena.skylifetv.co.kr/ena.skylifetv.co.kr.channels.xml --output=guide.xml --days=2
+
+const { parser, url } = require('./ena.skylifetv.co.kr.config.js')
+const fs = require('fs')
+const path = require('path')
+const dayjs = require('dayjs')
+const utc = require('dayjs/plugin/utc')
+const customParseFormat = require('dayjs/plugin/customParseFormat')
+dayjs.extend(customParseFormat)
+dayjs.extend(utc)
+
+const date = dayjs.utc('2023-01-27', 'YYYY-MM-DD').startOf('d')
+const channel = {
+ site_id: 'ENA',
+ xmltv_id: 'ENA.kr'
+}
+
+it('can generate valid url', () => {
+ expect(url({ channel, date })).toBe('http://ena.skylifetv.co.kr/ENA/?day=20230127&sc_dvsn=U')
+})
+
+it('can parse response', () => {
+ const content = fs.readFileSync(path.resolve(__dirname, '__data__/content.html'), 'utf8')
+ let results = parser({ content, date })
+ results = results.map(p => {
+ p.start = p.start.toJSON()
+ p.stop = p.stop.toJSON()
+ return p
+ })
+
+ expect(results[0]).toMatchObject({
+ start: '2023-01-26T16:05:00.000Z',
+ stop: '2023-01-26T17:20:00.000Z',
+ title: `법쩐 6화`,
+ rating: {
+ system: 'KMRB',
+ value: '15'
+ }
+ })
+
+ expect(results[17]).toMatchObject({
+ start: '2023-01-27T14:10:00.000Z',
+ stop: '2023-01-27T15:25:00.000Z',
+ title: `남이 될 수 있을까 4화`,
+ rating: {
+ system: 'KMRB',
+ value: '15'
+ }
+ })
+})
+
+it('can handle empty guide', () => {
+ const results = parser({
+ date,
+ content: fs.readFileSync(path.resolve(__dirname, '__data__/no_content.html'), 'utf8')
+ })
+
+ expect(results).toMatchObject([])
+})