mirror of
https://github.com/iptv-org/epg.git
synced 2025-05-09 16:40:07 -04:00
Merge pull request #2077 from iptv-org/delete-seezntv.com
Delete seezntv.com
This commit is contained in:
commit
64498666c7
3 changed files with 0 additions and 246 deletions
|
@ -1,99 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<site site="seezntv.com">
|
||||
<channels>
|
||||
<channel lang="ko" xmltv_id="AlltheKPop.kr" site_id="813">All the K-POP</channel>
|
||||
<channel lang="ko" xmltv_id="Anibox.kr" site_id="436">애니박스</channel>
|
||||
<channel lang="ko" xmltv_id="AnimaxKorea.kr" site_id="409">애니맥스</channel>
|
||||
<channel lang="ko" xmltv_id="Anione.kr" site_id="426">애니원티비</channel>
|
||||
<channel lang="ko" xmltv_id="Aniplus.kr" site_id="217">애니플러스</channel>
|
||||
<channel lang="ko" xmltv_id="AsiaN.kr" site_id="215">Asia N</channel>
|
||||
<channel lang="ko" xmltv_id="BadukTV.kr" site_id="289">바둑TV</channel>
|
||||
<channel lang="ko" xmltv_id="BBCWorldNewsAsiaPacific.uk" site_id="213">BBC WN</channel>
|
||||
<channel lang="ko" xmltv_id="BilliardsTV.kr" site_id="236">billiards tv</channel>
|
||||
<channel lang="ko" xmltv_id="CarrieTV.kr" site_id="506">캐리TV</channel>
|
||||
<channel lang="ko" xmltv_id="ChannelA.kr" site_id="467">채널A</channel>
|
||||
<channel lang="ko" xmltv_id="ChannelChina.kr" site_id="458">채널차이나</channel>
|
||||
<channel lang="ko" xmltv_id="ChannelOllehTV.kr" site_id="404">채널 olleh tv</channel>
|
||||
<channel lang="ko" xmltv_id="ChannelSeezn.kr" site_id="470">채널 seezn</channel>
|
||||
<channel lang="ko" xmltv_id="ChunghwaTV.kr" site_id="287">중화TV</channel>
|
||||
<channel lang="ko" xmltv_id="CinemaHeaven.kr" site_id="821">시네마천국</channel>
|
||||
<channel lang="ko" xmltv_id="CJOnStyle.kr" site_id="464">CJ ONSTYLE</channel>
|
||||
<channel lang="ko" xmltv_id="CJOnStylePlus.kr" site_id="517">CJ ONSTYLE+</channel>
|
||||
<channel lang="ko" xmltv_id="CNNInternationalAsiaPacific.hk" site_id="212">CNN Int'l</channel>
|
||||
<channel lang="ko" xmltv_id="CopadelRey.kr" site_id="754">스페인 국왕컵 축구</channel>
|
||||
<channel lang="ko" xmltv_id="DaekyoKidsTV.kr" site_id="278">어린이TV</channel>
|
||||
<channel lang="ko" xmltv_id="DiscoveryChannelKorea.kr" site_id="177">디스커버리채널</channel>
|
||||
<channel lang="ko" xmltv_id="DreamWorksChannelAsia.us" site_id="451">드림웍스 채널</channel>
|
||||
<channel lang="ko" xmltv_id="EBSEnglish.kr" site_id="270">EBS English(중학3)</channel>
|
||||
<channel lang="ko" xmltv_id="EBSKids.kr" site_id="437">EBS kids</channel>
|
||||
<channel lang="ko" xmltv_id="EBSPlus1.kr" site_id="242">EBS플러스1(고등)</channel>
|
||||
<channel lang="ko" xmltv_id="EBSPlus2.kr" site_id="243">EBS플러스2(초등1,2)</channel>
|
||||
<channel lang="ko" xmltv_id="FTV.kr" site_id="239">FTV</channel>
|
||||
<channel lang="ko" xmltv_id="GolfPBA.kr" site_id="237">GOLF&PBA</channel>
|
||||
<channel lang="ko" xmltv_id="GongyoungHomeShopping.kr" site_id="921">공영쇼핑</channel>
|
||||
<channel lang="ko" xmltv_id="GSMyShop.kr" site_id="444">GS MY SHOP</channel>
|
||||
<channel lang="ko" xmltv_id="GSShop.kr" site_id="439">GS SHOP</channel>
|
||||
<channel lang="ko" xmltv_id="HomeShopping.kr" site_id="460">홈&쇼핑</channel>
|
||||
<channel lang="ko" xmltv_id="HoneyTV.kr" site_id="501">허니TV</channel>
|
||||
<channel lang="ko" xmltv_id="HyundaiHomeShopping.kr" site_id="442">현대홈쇼핑</channel>
|
||||
<channel lang="ko" xmltv_id="HyundaiHomeShoppingPlusShop.kr" site_id="449">현대홈쇼핑+샵</channel>
|
||||
<channel lang="ko" xmltv_id="IBSports.kr" site_id="271">IB SPORTS</channel>
|
||||
<channel lang="ko" xmltv_id="iHQDrama.kr" site_id="457">iHQ drama</channel>
|
||||
<channel lang="ko" xmltv_id="IndieFilm.kr" site_id="818">인디필름</channel>
|
||||
<channel lang="ko" xmltv_id="JTBC.kr" site_id="273">JTBC</channel>
|
||||
<channel lang="ko" xmltv_id="JTBC2.kr" site_id="455">JTBC2</channel>
|
||||
<channel lang="ko" xmltv_id="JTBC4.kr" site_id="523">JTBC4</channel>
|
||||
<channel lang="ko" xmltv_id="JTBCGolf.kr" site_id="299">JTBC Golf</channel>
|
||||
<channel lang="ko" xmltv_id="JTBCGolfSports.kr" site_id="445">JTBC GOLF&SPORTS</channel>
|
||||
<channel lang="ko" xmltv_id="KBaduk.kr" site_id="238">K바둑</channel>
|
||||
<channel lang="ko" xmltv_id="KoreaEconomyTV.kr" site_id="408">한국경제TV</channel>
|
||||
<channel lang="ko" xmltv_id="KShopping.kr" site_id="438">K쇼핑</channel>
|
||||
<channel lang="ko" xmltv_id="LotteHomeShopping.kr" site_id="440">롯데홈쇼핑</channel>
|
||||
<channel lang="ko" xmltv_id="LotteOneTV.kr" site_id="923">롯데OneTV</channel>
|
||||
<channel lang="ko" xmltv_id="MBN.kr" site_id="274">MBN</channel>
|
||||
<channel lang="ko" xmltv_id="MiaoMi.hk" site_id="521">Miao Mi</channel>
|
||||
<channel lang="ko" xmltv_id="Midnight.kr" site_id="448">미드나잇 채널</channel>
|
||||
<channel lang="ko" xmltv_id="Mnet.kr" site_id="285">Mnet</channel>
|
||||
<channel lang="ko" xmltv_id="NationalGeographicWildKorea.kr" site_id="170">NAT GEO WILD</channel>
|
||||
<channel lang="ko" xmltv_id="NSHomeShopping.kr" site_id="441">NS홈쇼핑</channel>
|
||||
<channel lang="ko" xmltv_id="NSShopPlus.kr" site_id="461">NS SHOP+</channel>
|
||||
<channel lang="ko" xmltv_id="OBSGyeonginTV.kr" site_id="407">OBS</channel>
|
||||
<channel lang="ko" xmltv_id="OCN.kr" site_id="801">OCN</channel>
|
||||
<channel lang="ko" xmltv_id="OGN.kr" site_id="288">OGN</channel>
|
||||
<channel lang="ko" xmltv_id="OLIFE.kr" site_id="503">OLIFE</channel>
|
||||
<channel lang="ko" xmltv_id="Olive.kr" site_id="281">Olive</channel>
|
||||
<channel lang="ko" xmltv_id="Pinkfong.kr" site_id="505">핑크퐁</channel>
|
||||
<channel lang="ko" xmltv_id="PlayboyTVKorea.kr" site_id="500">플레이보이 TV</channel>
|
||||
<channel lang="ko" xmltv_id="PLAYYActionMovie.kr" site_id="468">PLAYY 액션 영화</channel>
|
||||
<channel lang="ko" xmltv_id="PLAYYHealingMovie.kr" site_id="469">PLAYY 힐링 영화</channel>
|
||||
<channel lang="ko" xmltv_id="PLAYYPremiumMovie.kr" site_id="453">PLAYY 프리미엄</channel>
|
||||
<channel lang="ko" xmltv_id="PLAYYWellMadeMovie.kr" site_id="452">PLAYY 웰메이드</channel>
|
||||
<channel lang="ko" xmltv_id="PoyoTV.kr" site_id="509">뽀요TV</channel>
|
||||
<channel lang="ko" xmltv_id="ProfessionalBaseball1.kr" site_id="292">프로야구 1</channel>
|
||||
<channel lang="ko" xmltv_id="ProfessionalBaseball2.kr" site_id="293">프로야구 2</channel>
|
||||
<channel lang="ko" xmltv_id="ProfessionalBaseball3.kr" site_id="294">프로야구 3</channel>
|
||||
<channel lang="ko" xmltv_id="ProfessionalBaseball4.kr" site_id="264">프로야구 4</channel>
|
||||
<channel lang="ko" xmltv_id="ProfessionalBaseball5.kr" site_id="265">프로야구 5</channel>
|
||||
<channel lang="ko" xmltv_id="SBSFL.kr" site_id="524">SBS F!L</channel>
|
||||
<channel lang="ko" xmltv_id="SBSGolf.kr" site_id="504">SBS 골프</channel>
|
||||
<channel lang="ko" xmltv_id="ScreenGolfzon.kr" site_id="816">스크린골프존</channel>
|
||||
<channel lang="ko" xmltv_id="ShinsegaeTVShopping.kr" site_id="462">신세계쇼핑</channel>
|
||||
<channel lang="ko" xmltv_id="ShoppingNT.kr" site_id="924">쇼핑엔티</channel>
|
||||
<channel lang="ko" xmltv_id="SKStoa.kr" site_id="925">SK스토아</channel>
|
||||
<channel lang="ko" xmltv_id="skySports.kr" site_id="525">skySports</channel>
|
||||
<channel lang="ko" xmltv_id="Telenovela.kr" site_id="216">텔레노벨라</channel>
|
||||
<channel lang="ko" xmltv_id="TheMovie.kr" site_id="141">THE MOVIE</channel>
|
||||
<channel lang="ko" xmltv_id="TomatoTV.kr" site_id="185">토마토증권통</channel>
|
||||
<channel lang="ko" xmltv_id="Tooniverse.kr" site_id="456">Tooniverse</channel>
|
||||
<channel lang="ko" xmltv_id="TVChosun.kr" site_id="276">TV CHOSUN</channel>
|
||||
<channel lang="ko" xmltv_id="tvN.kr" site_id="280">tvN</channel>
|
||||
<channel lang="ko" xmltv_id="tvNDrama.kr" site_id="282">tvN DRAMA</channel>
|
||||
<channel lang="ko" xmltv_id="tvNShow.kr" site_id="284">tvN SHOW</channel>
|
||||
<channel lang="ko" xmltv_id="tvNStory.kr" site_id="283">tvN STORY</channel>
|
||||
<channel lang="ko" xmltv_id="Viki.kr" site_id="447">VIKI</channel>
|
||||
<channel lang="ko" xmltv_id="WShopping.kr" site_id="922">W쇼핑</channel>
|
||||
<channel lang="ko" xmltv_id="YonhapNewsTV.kr" site_id="277">연합뉴스TV</channel>
|
||||
<channel lang="ko" xmltv_id="YTN.kr" site_id="254">YTN</channel>
|
||||
<channel lang="ko" xmltv_id="YTNScience.kr" site_id="410">사이언스TV</channel>
|
||||
</channels>
|
||||
</site>
|
|
@ -1,91 +0,0 @@
|
|||
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)
|
||||
|
||||
module.exports = {
|
||||
site: 'seezntv.com',
|
||||
skip: true, // NOTE: the site was closed on December 31, 2022
|
||||
days: 2,
|
||||
url: function ({ channel }) {
|
||||
return `https://api.seezntv.com/svc/menu/app6/api/epg_proglist?ch_no=${channel.site_id}&search_day=1`
|
||||
},
|
||||
request: {
|
||||
headers: {
|
||||
'X-DEVICE-TYPE': 'PCWEB',
|
||||
'X-DEVICE-MODEL': 'Chrome',
|
||||
'X-OS-TYPE': 'Windows',
|
||||
'X-OS-VERSION': '11',
|
||||
transactionId: '0'
|
||||
}
|
||||
},
|
||||
parser: function ({ content, date }) {
|
||||
let programs = []
|
||||
const items = parseItems(content, date)
|
||||
items.forEach(item => {
|
||||
const start = parseStart(item)
|
||||
let stop = parseStop(item)
|
||||
if (stop.isBefore(start)) {
|
||||
stop = stop.add(1, 'd')
|
||||
}
|
||||
|
||||
programs.push({
|
||||
title: parseTitle(item),
|
||||
start,
|
||||
stop
|
||||
})
|
||||
})
|
||||
|
||||
return programs
|
||||
},
|
||||
async channels({ country }) {
|
||||
const channels = []
|
||||
|
||||
const data = await axios
|
||||
.get(`https://api.seezntv.com/svc/menu/app6/api/epg_chlist?category_id=1`, {
|
||||
headers: {
|
||||
'X-DEVICE-TYPE': 'PCWEB',
|
||||
transactionId: '0'
|
||||
}
|
||||
})
|
||||
.then(r => r.data.data.list[0])
|
||||
.catch(console.log)
|
||||
|
||||
data.list_channel.forEach(i => {
|
||||
channels.push({
|
||||
name: i.service_ch_name,
|
||||
site_id: i.ch_no,
|
||||
lang: 'ko'
|
||||
})
|
||||
})
|
||||
|
||||
return channels
|
||||
}
|
||||
}
|
||||
|
||||
function parseTitle(item) {
|
||||
const name = item.program_name.replace(/\+/g, ' ')
|
||||
|
||||
return decodeURIComponent(name)
|
||||
}
|
||||
|
||||
function parseStart(item) {
|
||||
return dayjs.tz(`${item.start_ymd} ${item.start_time}`, 'YYYYMMDD HH:mm', 'Asia/Seoul')
|
||||
}
|
||||
|
||||
function parseStop(item) {
|
||||
return dayjs.tz(`${item.start_ymd} ${item.end_time}`, 'YYYYMMDD HH:mm', 'Asia/Seoul')
|
||||
}
|
||||
|
||||
function parseItems(content, date) {
|
||||
const data = JSON.parse(content)
|
||||
if (!data || !data.data || !Array.isArray(data.data.list)) return []
|
||||
const d = date.format('YYYYMMDD')
|
||||
|
||||
return data.data.list.filter(i => i.start_ymd === d)
|
||||
}
|
|
@ -1,56 +0,0 @@
|
|||
// npm run channels:parse -- --config=sites/seezntv.com/seezntv.com.config.js --output=sites/seezntv.com/seezntv.com.channels.xml
|
||||
// npx epg-grabber --config=sites/seezntv.com/seezntv.com.config.js --channels=sites/seezntv.com/seezntv.com.channels.xml --output=guide.xml --days=2
|
||||
|
||||
const { parser, url, request } = require('./seezntv.com.config.js')
|
||||
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('2022-04-18', 'YYYY-MM-DD').startOf('d')
|
||||
const channel = {
|
||||
site_id: '285',
|
||||
xmltv_id: 'MNet.kr'
|
||||
}
|
||||
|
||||
it('can generate valid url', () => {
|
||||
expect(url({ channel })).toBe(
|
||||
'https://api.seezntv.com/svc/menu/app6/api/epg_proglist?ch_no=285&search_day=1'
|
||||
)
|
||||
})
|
||||
|
||||
it('can generate valid request headers', () => {
|
||||
expect(request.headers).toMatchObject({
|
||||
'X-DEVICE-TYPE': 'PCWEB',
|
||||
'X-DEVICE-MODEL': 'Chrome',
|
||||
'X-OS-TYPE': 'Windows',
|
||||
'X-OS-VERSION': '11',
|
||||
transactionId: '0'
|
||||
})
|
||||
})
|
||||
|
||||
it('can parse response', () => {
|
||||
const content = `{"data":{"list":[{"rebroad":"Y","onair_yn":"N","program_subname":"","program_name":"%ED%80%B8%EB%8D%A4+2","block_yn":"N","ch_image_list":"http://img.megatvdnp.co.kr/uploads/images/channel_image/imgurl/20150910/OMSMNG_20150910145634780.png","hd":"Y","frequency":"3","ch_image_detail":"http://img.megatvdnp.co.kr/uploads/images/channel_image/imgurl/20150910/OMSMNG_20150910145634780.png","director":"","live_url":"http://menu.megatvdnp.co.kr:38086/app6/api/epg_play?ch_no=27","start_ymd":"20220418","free_yn":"N","service_ch_name":"Mnet","cast":"태연,이용진","ch_image_onair":"http://img.megatvdnp.co.kr/uploads/images/channel_image/imgurl/20150910/OMSMNG_20150910145634780.png","end_time":"00:00","start_time":"21:50","pack_group_id":"MTVBA","rating":"15","program_id":"C315691275285","live":"N"},{"rebroad":"Y","onair_yn":"N","program_subname":"","program_name":"My+Boyfriend+is+Better","block_yn":"N","ch_image_list":"http://img.megatvdnp.co.kr/uploads/images/channel_image/imgurl/20150910/OMSMNG_20150910145634780.png","hd":"Y","frequency":"4","ch_image_detail":"http://img.megatvdnp.co.kr/uploads/images/channel_image/imgurl/20150910/OMSMNG_20150910145634780.png","director":"","live_url":"http://menu.megatvdnp.co.kr:38086/app6/api/epg_play?ch_no=27","start_ymd":"20220419","free_yn":"N","service_ch_name":"Mnet","cast":"","ch_image_onair":"http://img.megatvdnp.co.kr/uploads/images/channel_image/imgurl/20150910/OMSMNG_20150910145634780.png","end_time":"01:50","start_time":"00:00","pack_group_id":"MTVBA","rating":"15","program_id":"C315691277285","live":"N"}]},"meta":{"code":"200"}}`
|
||||
const result = parser({ content, date }).map(p => {
|
||||
p.start = p.start.toJSON()
|
||||
p.stop = p.stop.toJSON()
|
||||
return p
|
||||
})
|
||||
|
||||
expect(result).toMatchObject([
|
||||
{
|
||||
start: '2022-04-18T12:50:00.000Z',
|
||||
stop: '2022-04-18T15:00:00.000Z',
|
||||
title: '퀸덤 2'
|
||||
}
|
||||
])
|
||||
})
|
||||
|
||||
it('can handle empty guide', () => {
|
||||
const result = parser({
|
||||
content: `{"meta":{"error_type":"Non Content","error_message":"클라이언트의 요구를 처리했으나 전송할 데이터가 없음","code":"204"}}`,
|
||||
date
|
||||
})
|
||||
expect(result).toMatchObject([])
|
||||
})
|
Loading…
Add table
Add a link
Reference in a new issue