mirror of
https://github.com/iptv-org/epg
synced 2025-12-16 18:37:01 -05:00
Update /sites
This commit is contained in:
@@ -1,22 +1,20 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<site site="mewatch.sg">
|
||||
<channels>
|
||||
<channel lang="en" xmltv_id="Channel5.sg" site_id="97098">Channel 5</channel>
|
||||
<channel lang="en" xmltv_id="Channel8.sg" site_id="97104">Channel 8</channel>
|
||||
<channel lang="en" xmltv_id="ChannelU.sg" site_id="97129">Channel U</channel>
|
||||
<channel lang="en" xmltv_id="Suria.sg" site_id="97084">Suria</channel>
|
||||
<channel lang="en" xmltv_id="Vasantham.sg" site_id="97096">Vasantham</channel>
|
||||
<channel lang="en" xmltv_id="CNA.sg" site_id="97072">CNA</channel>
|
||||
<channel lang="en" xmltv_id="oktolidays.sg" site_id="186574">oktolidays</channel>
|
||||
<channel lang="en" xmltv_id="eGGNetwork.my" site_id="206958">eGG Network</channel>
|
||||
<channel lang="en" xmltv_id="AnimaxAsia.sg" site_id="242030">Animax</channel>
|
||||
<channel lang="en" xmltv_id="GEM.sg" site_id="242036">GEM</channel>
|
||||
<channel lang="en" xmltv_id="HBOAsia.sg" site_id="97137">HBO</channel>
|
||||
<channel lang="en" xmltv_id="HBOHitsAsia.sg" site_id="97140">HBO Hits</channel>
|
||||
<channel lang="en" xmltv_id="HBOFamilyAsia.sg" site_id="97147">HBO Family</channel>
|
||||
<channel lang="en" xmltv_id="HBOSignatureAsia.sg" site_id="97146">HBO Signature</channel>
|
||||
<channel lang="en" xmltv_id="CinemaxAsia.sg" site_id="97155">Cinemax</channel>
|
||||
<channel lang="en" xmltv_id="meWATCHLIVE1.sg" site_id="97073">LIVE 1</channel>
|
||||
<channel lang="en" xmltv_id="meWATCHLIVE2.sg" site_id="97078">LIVE 2</channel>
|
||||
</channels>
|
||||
</site>
|
||||
<channels>
|
||||
<channel site="mewatch.sg" lang="en" xmltv_id="AnimaxAsia.sg" site_id="242030">Animax</channel>
|
||||
<channel site="mewatch.sg" lang="en" xmltv_id="Channel5.sg" site_id="97098">Channel 5</channel>
|
||||
<channel site="mewatch.sg" lang="en" xmltv_id="Channel8.sg" site_id="97104">Channel 8</channel>
|
||||
<channel site="mewatch.sg" lang="en" xmltv_id="ChannelU.sg" site_id="97129">Channel U</channel>
|
||||
<channel site="mewatch.sg" lang="en" xmltv_id="CinemaxAsia.sg" site_id="97155">Cinemax</channel>
|
||||
<channel site="mewatch.sg" lang="en" xmltv_id="CNA.sg" site_id="97072">CNA</channel>
|
||||
<channel site="mewatch.sg" lang="en" xmltv_id="eGGNetwork.my" site_id="206958">eGG Network</channel>
|
||||
<channel site="mewatch.sg" lang="en" xmltv_id="GEM.sg" site_id="242036">GEM</channel>
|
||||
<channel site="mewatch.sg" lang="en" xmltv_id="HBOAsia.sg" site_id="97137">HBO</channel>
|
||||
<channel site="mewatch.sg" lang="en" xmltv_id="HBOFamilyAsia.sg" site_id="97147">HBO Family</channel>
|
||||
<channel site="mewatch.sg" lang="en" xmltv_id="HBOHitsAsia.sg" site_id="97140">HBO Hits</channel>
|
||||
<channel site="mewatch.sg" lang="en" xmltv_id="HBOSignatureAsia.sg" site_id="97146">HBO Signature</channel>
|
||||
<channel site="mewatch.sg" lang="en" xmltv_id="meWATCHLIVE1.sg" site_id="97073">LIVE 1</channel>
|
||||
<channel site="mewatch.sg" lang="en" xmltv_id="meWATCHLIVE2.sg" site_id="97078">LIVE 2</channel>
|
||||
<channel site="mewatch.sg" lang="en" xmltv_id="oktolidays.sg" site_id="186574">oktolidays</channel>
|
||||
<channel site="mewatch.sg" lang="en" xmltv_id="Suria.sg" site_id="97084">Suria</channel>
|
||||
<channel site="mewatch.sg" lang="en" xmltv_id="Vasantham.sg" site_id="97096">Vasantham</channel>
|
||||
</channels>
|
||||
|
||||
@@ -40,7 +40,7 @@ function parseStop(item) {
|
||||
function parseRating(info) {
|
||||
const classification = info.classification
|
||||
if (classification && classification.code) {
|
||||
const [_, system, value] = classification.code.match(/^([A-Z]+)\-([A-Z0-9]+)/) || [
|
||||
const [, system, value] = classification.code.match(/^([A-Z]+)-([A-Z0-9]+)/) || [
|
||||
null,
|
||||
null,
|
||||
null
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// npx epg-grabber --config=sites/mewatch.sg/mewatch.sg.config.js --channels=sites/mewatch.sg/mewatch.sg.channels.xml --output=guide.xml --days=2
|
||||
// npm run grab -- --site=mewatch.sg
|
||||
|
||||
const { parser, url } = require('./mewatch.sg.config.js')
|
||||
const dayjs = require('dayjs')
|
||||
@@ -20,7 +20,8 @@ it('can generate valid url', () => {
|
||||
})
|
||||
|
||||
it('can parse response', () => {
|
||||
const content = `[{"channelId":"97098","startDate":"2022-06-11T21:00:00.000Z","endDate":"2022-06-12T21:00:00.000Z","schedules":[{"channelId":"97098","customId":"37040748","endDate":"2022-06-11T21:30:00Z","id":"788a7dd","live":false,"startDate":"2022-06-11T21:00:00Z","isGap":false,"InteractiveType":"0","item":{"type":"episode","title":"Open Homes S3 - EP 2","blackoutMessage":"Programme is not available for live streaming.","description":"Mike heads down to the Sydney beaches to visit a beachside renovation with all the bells and whistles, we see a kitchen tip and recipe anyone can do at home. We finish up in the prestigious Byron bay to visit a multi million dollar award winning home.","classification":{"code":"IMDA-G (Violence)","name":"G (Violence)"},"episodeNumber":2,"episodeTitle":"Collaroy, Sydney","seasonNumber":3,"images":{"wallpaper":"https://production.togglestatic.com/shain/v1/dataservice/ResizeImage/$value?Format='jpg'&Quality=85&ImageId='4853691'&EntityType='LinearSchedule'&EntityId='788a7dd9-9b12-446f-91b4-c8ac9fec95e5'&Width=1280&Height=720&device=web_browser&subscriptions=Anonymous&segmentationTags=all","tile":"https://production.togglestatic.com/shain/v1/dataservice/ResizeImage/$value?Format='jpg'&Quality=85&ImageId='4853697'&EntityType='LinearSchedule'&EntityId='788a7dd9-9b12-446f-91b4-c8ac9fec95e5'&Width=1280&Height=720&device=web_browser&subscriptions=Anonymous&segmentationTags=all"},"enableCatchUp":true,"enableStartOver":false,"enableSeeking":false,"programSource":"ACQUIRED","simulcast":"LOCAL","masterReferenceKey":"0CH50CH5A0105567800020A0000000000P3254400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"}}]}]`
|
||||
const content =
|
||||
'[{"channelId":"97098","startDate":"2022-06-11T21:00:00.000Z","endDate":"2022-06-12T21:00:00.000Z","schedules":[{"channelId":"97098","customId":"37040748","endDate":"2022-06-11T21:30:00Z","id":"788a7dd","live":false,"startDate":"2022-06-11T21:00:00Z","isGap":false,"InteractiveType":"0","item":{"type":"episode","title":"Open Homes S3 - EP 2","blackoutMessage":"Programme is not available for live streaming.","description":"Mike heads down to the Sydney beaches to visit a beachside renovation with all the bells and whistles, we see a kitchen tip and recipe anyone can do at home. We finish up in the prestigious Byron bay to visit a multi million dollar award winning home.","classification":{"code":"IMDA-G (Violence)","name":"G (Violence)"},"episodeNumber":2,"episodeTitle":"Collaroy, Sydney","seasonNumber":3,"images":{"wallpaper":"https://production.togglestatic.com/shain/v1/dataservice/ResizeImage/$value?Format=\'jpg\'&Quality=85&ImageId=\'4853691\'&EntityType=\'LinearSchedule\'&EntityId=\'788a7dd9-9b12-446f-91b4-c8ac9fec95e5\'&Width=1280&Height=720&device=web_browser&subscriptions=Anonymous&segmentationTags=all","tile":"https://production.togglestatic.com/shain/v1/dataservice/ResizeImage/$value?Format=\'jpg\'&Quality=85&ImageId=\'4853697\'&EntityType=\'LinearSchedule\'&EntityId=\'788a7dd9-9b12-446f-91b4-c8ac9fec95e5\'&Width=1280&Height=720&device=web_browser&subscriptions=Anonymous&segmentationTags=all"},"enableCatchUp":true,"enableStartOver":false,"enableSeeking":false,"programSource":"ACQUIRED","simulcast":"LOCAL","masterReferenceKey":"0CH50CH5A0105567800020A0000000000P3254400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"}}]}]'
|
||||
const result = parser({ content, channel }).map(p => {
|
||||
p.start = p.start.toJSON()
|
||||
p.stop = p.stop.toJSON()
|
||||
@@ -34,7 +35,7 @@ it('can parse response', () => {
|
||||
title: 'Open Homes S3 - EP 2',
|
||||
description:
|
||||
'Mike heads down to the Sydney beaches to visit a beachside renovation with all the bells and whistles, we see a kitchen tip and recipe anyone can do at home. We finish up in the prestigious Byron bay to visit a multi million dollar award winning home.',
|
||||
icon: `https://production.togglestatic.com/shain/v1/dataservice/ResizeImage/$value?Format='jpg'&Quality=85&ImageId='4853697'&EntityType='LinearSchedule'&EntityId='788a7dd9-9b12-446f-91b4-c8ac9fec95e5'&Width=1280&Height=720&device=web_browser&subscriptions=Anonymous&segmentationTags=all`,
|
||||
icon: "https://production.togglestatic.com/shain/v1/dataservice/ResizeImage/$value?Format='jpg'&Quality=85&ImageId='4853697'&EntityType='LinearSchedule'&EntityId='788a7dd9-9b12-446f-91b4-c8ac9fec95e5'&Width=1280&Height=720&device=web_browser&subscriptions=Anonymous&segmentationTags=all",
|
||||
episode: 2,
|
||||
season: 3,
|
||||
rating: {
|
||||
@@ -47,7 +48,8 @@ it('can parse response', () => {
|
||||
|
||||
it('can handle empty guide', () => {
|
||||
const result = parser({
|
||||
content: `[{"channelId":"9798","startDate":"2022-06-11T21:00:00.000Z","endDate":"2022-06-12T21:00:00.000Z","schedules":[]}]`,
|
||||
content:
|
||||
'[{"channelId":"9798","startDate":"2022-06-11T21:00:00.000Z","endDate":"2022-06-12T21:00:00.000Z","schedules":[]}]',
|
||||
channel
|
||||
})
|
||||
expect(result).toMatchObject([])
|
||||
|
||||
Reference in New Issue
Block a user