From 45f749307b3b6aab41f5da8fdafed0fd483ab4f5 Mon Sep 17 00:00:00 2001 From: Aleksandr Statciuk Date: Mon, 27 Sep 2021 00:20:43 +0300 Subject: [PATCH 1/5] Create dstv.com.config.js --- sites/dstv.com.config.js | 73 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 sites/dstv.com.config.js diff --git a/sites/dstv.com.config.js b/sites/dstv.com.config.js new file mode 100644 index 00000000..4841556f --- /dev/null +++ b/sites/dstv.com.config.js @@ -0,0 +1,73 @@ +const cheerio = require('cheerio') +const dayjs = require('dayjs') +const utc = require('dayjs/plugin/utc') +const customParseFormat = require('dayjs/plugin/customParseFormat') + +dayjs.extend(utc) +dayjs.extend(customParseFormat) + +module.exports = { + lang: 'en', + days: 3, + site: 'dstv.com', + channels: 'dstv.com.channels.xml', + output: '.gh-pages/guides/dstv.com.guide.xml', + request: { + timeout: 10000 + }, + url({ channel, date }) { + const [bouquetId] = channel.site_id.split('#') + + return `https://guide.dstv.com/api/gridview/page?&bouquetId=${bouquetId}&genre=all&date=${date.format( + 'YYYY-MM-DD' + )}` + }, + parser({ content, date, channel }) { + let PM = false + const programs = [] + const items = parseItems(content, date, channel) + items.forEach(item => { + const title = item.title + let start = parseStart(item, date) + if (start.hour() > 18 && !PM) return + if (start.hour() > 11 && start.hour() < 18) PM = true + if (start.hour() < 12 && PM) start = start.add(1, 'd') + const stop = start.add(30, 'm') + if (programs.length) { + programs[programs.length - 1].stop = start + } + + programs.push({ + title, + start, + stop + }) + }) + + return programs + } +} + +function parseStart(item, date) { + time = `${date.format('MM/DD/YYYY')} ${item.time}` + + return dayjs.utc(time, 'MM/DD/YYYY HH:mm') +} + +function parseItems(content, date, channel) { + const [_, channelTag] = channel.site_id.split('#') + const json = JSON.parse(content) + const html = json[channelTag] + if (!html) return [] + const $ = cheerio.load(html) + + return $('li') + .map((i, el) => { + return { + time: $(el).find('.event-time').text().trim(), + title: $(el).find('.event-title').text().trim() + } + }) + .toArray() + .filter(i => i.time && i.title) +} From 7842c1a414328170e51854ca02352f6c656995ce Mon Sep 17 00:00:00 2001 From: Aleksandr Statciuk Date: Mon, 27 Sep 2021 00:20:52 +0300 Subject: [PATCH 2/5] Create dstv.com.channels.xml --- sites/dstv.com.channels.xml | 204 ++++++++++++++++++++++++++++++++++++ 1 file changed, 204 insertions(+) create mode 100755 sites/dstv.com.channels.xml diff --git a/sites/dstv.com.channels.xml b/sites/dstv.com.channels.xml new file mode 100755 index 00000000..c13485a0 --- /dev/null +++ b/sites/dstv.com.channels.xml @@ -0,0 +1,204 @@ + + + + Abol TV + Africa Magic Epic + Afro Music Pop + Akwaaba Magic + Akili Kids! + Africa Magic Family + Africa Magic Urban + B4U Movies UK + Bloomberg TV Africa + BBC Brit South Africa + BBC World News Africa + CBS Justice Africa + CBeebies South Africa + CGTN Français + Comedy Central Africa + Citi TV + China Movie + CNN International Europe + CNBC Africa + SuperSport Cricket Africa + Curiosity Channel + CCTV 4 Europe + CGTN Documentary + CCTV Entertainment + Citizen TV + Plus TV + Dove TV + Dominion TV + Daystar TV + DW Deutsch + Edu Channel + Emmanuel TV + E TV Africa + ETV News + EuroNews Deutsch + EuroNews Français + EWTN Africa - Asia + BBC Lifestyle South Africa + Africa Magic Showcase Africa + Discovery Channel Middle East & Africa + M-Net Movies 1 East Africa + Universal TV Africa + Maisha Magic Bongo + Africa Magic Hausa + Honey + Africa Magic Igbo + Inooro TV + Islam Channel + Joy News + K24 + Kameme TV + Kass TV + KBC Channel 1 + Kix + Kiss TV + KTN News + KTN Home + Lifetime Africa + M-Net Movies 2 + M-Net East + Mambo Moto TV + Maisha Magic Movies + Maisha Magic Plus + M-Net Movies 4 + NTV Uganda + Africanews + NBS TV + NDTV 24x7 + NHK World Japan + Nick Jr Africa + Novela Magic + Newzroom Afrika + NickToons Africa + NTV + PBS Kids + Pearl Magic Prime + Plus TV Africa + Rai Italia Africa + Rwanda TV + Rok GH + Rok 2 + Rok + RTP Internacional Europa + Real Time Africa + SuperSport Rugby Africa + Tanzania Safari Channel + SBN International + Soundcity Africa + M-Net City + StarLife + Sky News International + M-Net Movies 3 + SABC News + Spice + STN + TV 47 + TV 1 + TBN Africa + TNT Africa + Telemundo Africa + Televista + Trace Gospel English Speaking Africa + Trace Jama + TLC Africa + Tlnovelas Europa + Trace Mziki + Trybe TV + TV E + UBC TV + Studio Universal Africa + Vuzu + 1 Magic Africa + Wasafi TV + WildEarth + Y254 + Africa Magic Yoruba + ZBC TV + Zee World + SuperSport Tennis + TV Miramar + Afro Music Channel + AXN Portugal + Aljazeera English + AXN Movies + BET Africa + Banda TV + Boomerang Portugal + CGTN + Cine Mundo + Cartoon Network Portugal + Txillo + Disney Channel Portugal + Disney Junior Portugal + Boom TV + Da Vinci + Mindset Learn + ESPN Africa + E! Africa + EuroNews Português + EuroNews English + Fox Crime Portugal + Fé TV + Fox Life Portugal + MundoFox + Fox Movies Portugal + Fox Portugal + Food Network EMEA + Fox Comedy Portugal + Gloom Channel + SuperSport Golf + SuperSport Variety 3 + SuperSport Premier League + SuperSport Grandstand + SuperSport Football Plus + SuperSport Variety 1 + SuperSport LaLiga + SuperSport Máximo 1 + SuperSport Máximo 2 + SuperSport Blitz + Discovery Family Africa + Investigation Discovery Africa + ESPN 2 Africa + Hip TV + History Africa + WWE Channel + Best Brasil + JimJam Europe + Jiangsu TV + TVCine Edition + Mega TV + Media Mais TV + MTV Portugal + MTV Africa + MTV Base Africa + SuperSport Máximo 360 + TVM + National Geographic Portugal + Nickelodeon Africa + National Geographic Wild South Africa + Palanca TV + Canal Panda Portugal + Panda Biggs + DSTV Pipoca + RTP África + Record News + CBS Reality Africa + SuperSport Football + STV Noticias + Strong Live + TVCine Emotion + TVCine Action + Faith Africa + TVCine Top + TLN Network + Trace Naija + Trace Toca + TV5Monde Afrique + SuperSport Variety 4 + TV Zimbo + + \ No newline at end of file From 61b451887149e6557af61a65988fcf887ad59f2c Mon Sep 17 00:00:00 2001 From: Aleksandr Statciuk Date: Mon, 27 Sep 2021 00:20:57 +0300 Subject: [PATCH 3/5] Update auto-update.yml --- .github/workflows/auto-update.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/auto-update.yml b/.github/workflows/auto-update.yml index dc2bdfdf..90a04a6a 100644 --- a/.github/workflows/auto-update.yml +++ b/.github/workflows/auto-update.yml @@ -19,6 +19,7 @@ jobs: comteco.com.bo, cosmote.gr, digiturk.com.tr, + dstv.com, elcinema.com, guidatv.sky.it, hd-plus.de, From 4b429eaf361d10c22ab649e2ead93562e2ff87f3 Mon Sep 17 00:00:00 2001 From: Aleksandr Statciuk Date: Mon, 27 Sep 2021 00:21:01 +0300 Subject: [PATCH 4/5] Update README.md --- README.md | 49 ++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 48 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 821c1c6b..d2b8f5fc 100644 --- a/README.md +++ b/README.md @@ -27,19 +27,40 @@ To load a program guide, all you need to do is copy the link to one of the guide 🇦🇴 Angolahttps://iptv-org.github.io/epg/guides/zap.co.ao.guide.xml 🇦🇺 Australiahttps://iptv-org.github.io/epg/guides/ontvtonight.com.guide.xml 🇧🇾 Belarushttps://iptv-org.github.io/epg/guides/tv.yandex.ru.guide.xml + 🇧🇯 Beninhttps://iptv-org.github.io/epg/guides/dstv.com.guide.xml 🇧🇴 Boliviahttps://iptv-org.github.io/epg/guides/comteco.com.bo.guide.xml 🇧🇦 Bosniahttps://iptv-org.github.io/epg/guides/tvprofil.com.guide.xml + 🇧🇼 Botswanahttps://iptv-org.github.io/epg/guides/dstv.com.guide.xml 🇧🇷 Brasilhttps://iptv-org.github.io/epg/guides/mi.tv.guide.xml 🇧🇬 Bulgariahttps://iptv-org.github.io/epg/guides/tvprofil.com.guide.xml + 🇧🇫 Burkina Fasohttps://iptv-org.github.io/epg/guides/dstv.com.guide.xml + 🇧🇮 Burundihttps://iptv-org.github.io/epg/guides/dstv.com.guide.xml + 🇨🇲 Cameroonhttps://iptv-org.github.io/epg/guides/dstv.com.guide.xml 🇨🇦 Canadahttps://iptv-org.github.io/epg/guides/tvtv.us.guide.xml + 🇨🇻 Cape Verdehttps://iptv-org.github.io/epg/guides/dstv.com.guide.xml + 🇨🇫 Central African Republichttps://iptv-org.github.io/epg/guides/dstv.com.guide.xml + 🇹🇩 Chadhttps://iptv-org.github.io/epg/guides/dstv.com.guide.xml 🇨🇳 Chinahttps://iptv-org.github.io/epg/guides/tv.cctv.com.guide.xml + 🇨🇬 Congo - Brazzavillehttps://iptv-org.github.io/epg/guides/dstv.com.guide.xml + 🇨🇩 Congo - Kinshasahttps://iptv-org.github.io/epg/guides/dstv.com.guide.xml + 🇨🇮 Côte d’Ivoirehttps://iptv-org.github.io/epg/guides/dstv.com.guide.xml 🇭🇷 Croatiahttps://iptv-org.github.io/epg/guides/maxtv.hrvatskitelekom.hr.guide.xml 🇨🇿 Czechiahttps://iptv-org.github.io/epg/guides/m.tv.sms.cz.guide.xml + 🇩🇯 Djiboutihttps://iptv-org.github.io/epg/guides/dstv.com.guide.xml 🇪🇬 Egypthttps://iptv-org.github.io/epg/guides/elcinema.com.guide.xml + 🇬🇶 Equatorial Guineahttps://iptv-org.github.io/epg/guides/dstv.com.guide.xml + 🇪🇷 Eritreahttps://iptv-org.github.io/epg/guides/dstv.com.guide.xml + 🇸🇿 Eswatinihttps://iptv-org.github.io/epg/guides/dstv.com.guide.xml + 🇪🇹 Ethiopiahttps://iptv-org.github.io/epg/guides/dstv.com.guide.xml 🇫🇮 Finlandhttps://iptv-org.github.io/epg/guides/telkussa.fi.guide.xml 🇫🇷 Francehttps://iptv-org.github.io/epg/guides/programme-tv.net.guide.xml + 🇬🇦 Gabonhttps://iptv-org.github.io/epg/guides/dstv.com.guide.xml + 🇬🇲 Gambiahttps://iptv-org.github.io/epg/guides/dstv.com.guide.xml 🇩🇪 Germanyhttps://iptv-org.github.io/epg/guides/hd-plus.de.guide.xml + 🇬🇭 Ghanahttps://iptv-org.github.io/epg/guides/dstv.com.guide.xml 🇬🇷 Greecehttps://iptv-org.github.io/epg/guides/cosmote.gr.guide.xml + 🇬🇳 Guineahttps://iptv-org.github.io/epg/guides/dstv.com.guide.xml + 🇬🇼 Guinea-Bissauhttps://iptv-org.github.io/epg/guides/dstv.com.guide.xml 🇮🇩 Indonesiahttps://iptv-org.github.io/epg/guides/mncvision.id.guide.xml https://iptv-org.github.io/epg/guides/vidio.com.guide.xml 🇭🇺 Hungaryhttps://iptv-org.github.io/epg/guides/tvprofil.com.guide.xml @@ -50,31 +71,57 @@ To load a program guide, all you need to do is copy the link to one of the guide 🇮🇶 Iraqhttps://iptv-org.github.io/epg/guides/elcinema.com.guide.xml 🇯🇴 Jordanhttps://iptv-org.github.io/epg/guides/elcinema.com.guide.xml 🇰🇿 Kazakhstanhttps://iptv-org.github.io/epg/guides/tv.yandex.ru.guide.xml + 🇰🇪 Kenyahttps://iptv-org.github.io/epg/guides/dstv.com.guide.xml 🇰🇼 Kuwaithttps://iptv-org.github.io/epg/guides/elcinema.com.guide.xml 🇱🇻 Latviahttps://iptv-org.github.io/epg/guides/tv.lv.guide.xml + 🇱🇸 Lesothohttps://iptv-org.github.io/epg/guides/dstv.com.guide.xml + 🇱🇷 Liberiahttps://iptv-org.github.io/epg/guides/dstv.com.guide.xml 🇱🇾 Libyahttps://iptv-org.github.io/epg/guides/elcinema.com.guide.xml + 🇲🇬 Madagascarhttps://iptv-org.github.io/epg/guides/dstv.com.guide.xml + 🇲🇼 Malawihttps://iptv-org.github.io/epg/guides/dstv.com.guide.xml 🇲🇾 Malaysiahttps://iptv-org.github.io/epg/guides/astro.com.my.guide.xml + 🇲🇱 Malihttps://iptv-org.github.io/epg/guides/dstv.com.guide.xml + 🇲🇷 Mauritaniahttps://iptv-org.github.io/epg/guides/dstv.com.guide.xml + 🇲🇺 Mauritiushttps://iptv-org.github.io/epg/guides/dstv.com.guide.xml 🇲🇦 Moroccohttps://iptv-org.github.io/epg/guides/elcinema.com.guide.xml 🇲🇪 Montenegrohttps://iptv-org.github.io/epg/guides/tvprofil.com.guide.xml + 🇲🇿 Mozambiquehttps://iptv-org.github.io/epg/guides/dstv.com.guide.xml + 🇳🇦 Namibiahttps://iptv-org.github.io/epg/guides/dstv.com.guide.xml + 🇳🇪 Nigerhttps://iptv-org.github.io/epg/guides/dstv.com.guide.xml + 🇳🇬 Nigeriahttps://iptv-org.github.io/epg/guides/dstv.com.guide.xml 🇲🇰 North Macedoniahttps://iptv-org.github.io/epg/guides/tvprofil.com.guide.xml 🇵🇱 Polandhttps://iptv-org.github.io/epg/guides/programtv.onet.pl.guide.xml 🇵🇹 Portugalhttps://iptv-org.github.io/epg/guides/meo.pt.guide.xml 🇷🇴 Romaniahttps://iptv-org.github.io/epg/guides/programetv.ro.guide.xml 🇷🇺 Russiahttps://iptv-org.github.io/epg/guides/tv.yandex.ru.guide.xml + 🇷🇼 Rwandahttps://iptv-org.github.io/epg/guides/dstv.com.guide.xml + 🇸🇹 São Tomé & Príncipehttps://iptv-org.github.io/epg/guides/dstv.com.guide.xml 🇸🇦 Saudi Arabiahttps://iptv-org.github.io/epg/guides/elcinema.com.guide.xml + 🇸🇳 Senegalhttps://iptv-org.github.io/epg/guides/dstv.com.guide.xml 🇷🇸 Serbiahttps://iptv-org.github.io/epg/guides/tvprofil.com.guide.xml + 🇸🇨 Seychelleshttps://iptv-org.github.io/epg/guides/dstv.com.guide.xml + 🇸🇱 Sierra Leonehttps://iptv-org.github.io/epg/guides/dstv.com.guide.xml 🇸🇮 Sloveniahttps://iptv-org.github.io/epg/guides/tvprofil.com.guide.xml + 🇸🇴 Somaliahttps://iptv-org.github.io/epg/guides/dstv.com.guide.xml + 🇿🇦 South Africahttps://iptv-org.github.io/epg/guides/dstv.com.guide.xml + 🇸🇸 South Sudanhttps://iptv-org.github.io/epg/guides/dstv.com.guide.xml 🇪🇸 Spainhttps://iptv-org.github.io/epg/guides/programacion-tv.elpais.com.guide.xml + 🇸🇩 Sudanhttps://iptv-org.github.io/epg/guides/dstv.com.guide.xml 🇸🇪 Swedenhttps://iptv-org.github.io/epg/guides/telkussa.fi.guide.xml 🇸🇾 Syriahttps://iptv-org.github.io/epg/guides/elcinema.com.guide.xml + 🇹🇿 Tanzaniahttps://iptv-org.github.io/epg/guides/dstv.com.guide.xml + 🇹🇬 Togohttps://iptv-org.github.io/epg/guides/dstv.com.guide.xml 🇹🇳 Tunisiahttps://iptv-org.github.io/epg/guides/elcinema.com.guide.xml 🇹🇷 Turkeyhttps://iptv-org.github.io/epg/guides/digiturk.com.tr.guide.xml + 🇺🇬 Ugandahttps://iptv-org.github.io/epg/guides/dstv.com.guide.xml 🇺🇦 Ukrainehttps://iptv-org.github.io/epg/guides/tvgid.ua.guide.xml 🇦🇪 United Arab Emirateshttps://iptv-org.github.io/epg/guides/elcinema.com.guide.xml 🇬🇧 United Kingdomhttps://iptv-org.github.io/epg/guides/ontvtonight.com.guide.xml 🇺🇸 United Stateshttps://iptv-org.github.io/epg/guides/tvtv.us.guide.xml https://iptv-org.github.io/epg/guides/tvguide.com.guide.xml - 🇿🇲 Zambiahttps://iptv-org.github.io/epg/guides/znbc.co.zm.guide.xml + 🇿🇲 Zambiahttps://iptv-org.github.io/epg/guides/dstv.com.guide.xml + https://iptv-org.github.io/epg/guides/znbc.co.zm.guide.xml + 🇿🇼 Zimbabwehttps://iptv-org.github.io/epg/guides/dstv.com.guide.xml From f415a14ad461ab44a405e3882f2365c21d06e7f3 Mon Sep 17 00:00:00 2001 From: Aleksandr Statciuk Date: Mon, 27 Sep 2021 00:24:32 +0300 Subject: [PATCH 5/5] Update README.md --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index d2b8f5fc..91a9d0a9 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ EPG (Electronic Program Guide) for thousands of TV channels collected from diffe ## Usage -To load a program guide, all you need to do is copy the link to one of the guides from the list below and paste it into your favorite player. +To load a program guide, all you need to do is copy the link to one or more of the guides from the list below and paste it into your favorite player.
Expand @@ -24,7 +24,8 @@ To load a program guide, all you need to do is copy the link to one of the guide 🇦🇱 Albaniahttps://iptv-org.github.io/epg/guides/tvprofil.com.guide.xml 🇦🇩 Andorrahttps://iptv-org.github.io/epg/guides/andorradifusio.ad.guide.xml 🇦🇲 Armeniahttps://iptv-org.github.io/epg/guides/tv.mail.ru.guide.xml - 🇦🇴 Angolahttps://iptv-org.github.io/epg/guides/zap.co.ao.guide.xml + 🇦🇴 Angolahttps://iptv-org.github.io/epg/guides/dstv.com.guide.xml + https://iptv-org.github.io/epg/guides/zap.co.ao.guide.xml 🇦🇺 Australiahttps://iptv-org.github.io/epg/guides/ontvtonight.com.guide.xml 🇧🇾 Belarushttps://iptv-org.github.io/epg/guides/tv.yandex.ru.guide.xml 🇧🇯 Beninhttps://iptv-org.github.io/epg/guides/dstv.com.guide.xml