diff --git a/.github/workflows/auto-update.yml b/.github/workflows/auto-update.yml index 9d856961..5b4d7407 100644 --- a/.github/workflows/auto-update.yml +++ b/.github/workflows/auto-update.yml @@ -42,6 +42,7 @@ jobs: tvprofil.com, tvtv.us, vidio.com, + zap.co.ao, znbc.co.zm ] steps: diff --git a/README.md b/README.md index 9e214624..45b4757b 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,7 @@ To load a program guide, all you need to do is copy the link to one of the guide 🇩🇿 Algeriahttps://iptv-org.github.io/epg/guides/elcinema.com.guide.xml 🇦🇱 Albaniahttps://iptv-org.github.io/epg/guides/tvprofil.com.guide.xml 🇦🇩 Andorrahttps://iptv-org.github.io/epg/guides/andorradifusio.ad.guide.xml + 🇦🇴 Angolahttps://iptv-org.github.io/epg/guides/zap.co.ao.guide.xml 🇦🇷 Argentinahttps://iptv-org.github.io/epg/guides/mi.tv.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 diff --git a/sites/zap.co.ao.channels.xml b/sites/zap.co.ao.channels.xml new file mode 100755 index 00000000..17943c5b --- /dev/null +++ b/sites/zap.co.ao.channels.xml @@ -0,0 +1,109 @@ + + + + TPA 1 + RTP África + A Bola TV + Sport TV África 1 + Zap Novelas + Zap Viva + TVI 24 + BBC World News Africa + EuroNews Português + SIC K + Canal Panda Portugal + TVE Internacional Europa + RT News + STV Noticias + TVI Internacional + RTP Internacional Europa + Band Internacional + CM TV + Band News + Sport TV África 1 + Benfica TV + NBA TV + ESPN Africa + Porto Canal + Motorvision TV + FightBox HD + Sporting TV + Biggs + Baby TV Europe + Disney Channel Portugal + Disney Junior Portugal + TVCine Top + TVCine Edition + TVCine Emotion + TVCine Action + Canal Hollywood Portugal + Fox Movies Portugal + Fox Life Portugal + Fox Portugal + AXN Portugal + AXN Portugal + Fox Crime Portugal + AXN Movies + TLN Network + TVI Ficção + SIC Radical + Colors + 24 Kitchen Portugal + Food Network EMEA + Luxe TV + Afro Music Channel + Stingray IConcerts + RFM TV + MCM Top + Stingray CMusic + Odisseia + Blaze Portugal + História Portugal + Travel Channel Europe + National Geographic Wild South Africa + National Geographic Portugal + MyZen Music + Aljazeera English + France 24 Français + Rossiya 24 + Bloomberg TV Africa + Rai Italia Africa + RTR Planeta + CCTV 4 Europe + Canal Programação + MyZen Nature + Cubavisión Internacional + Aljazeera Channel + Blast + Tiji + France 2 + France 3 + France 5 + LCI + Histoire TV + Ushuaïa TV + Zap Filmes HD + Zap Filmes 1 + Zap Filmes 2 + Zap Filmes 3 + Globo On + TV Globo Internacional África + La Liga na Zap + La Liga na Zap + Fox Comedy Portugal + RTNC + Télé 50 + ESPN 2 Africa + Digital Congo TV + Be Kuduro + Zap Viva + SIC Mulher + Gloom Channel + Extreme Sports Channel + Africanews + Gametoon + Gulli Brasil + Cubayo + Kix + + \ No newline at end of file diff --git a/sites/zap.co.ao.config.js b/sites/zap.co.ao.config.js new file mode 100644 index 00000000..c044b85c --- /dev/null +++ b/sites/zap.co.ao.config.js @@ -0,0 +1,60 @@ +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 = { + lang: 'pt', + days: 3, + site: 'zap.co.ao', + channels: 'zap.co.ao.channels.xml', + output: '.gh-pages/guides/zap.co.ao.guide.xml', + url: function ({ date, channel }) { + return `https://www.zap.co.ao/_api/channels/${date.format('YYYY-M-D')}/epg.json` + }, + logo({ content, channel }) { + const channels = JSON.parse(content) + const data = channels.find(ch => ch.id == channel.site_id) + + return data.image_uri + }, + parser: function ({ content, channel }) { + let PM = false + const programs = [] + const items = parseItems(content, channel) + if (!items.length) return programs + items.forEach(item => { + let start = parseStart(item) + if (start.hour() > 11) PM = true + if (start.hour() < 12 && PM) start = start.add(1, 'd') + const stop = start.add(item.duration, 's') + programs.push({ + title: item.name, + description: item.sinopse, + start, + stop + }) + }) + + return programs + } +} + +function parseItems(content, channel) { + const channels = JSON.parse(content) + const data = channels.find(ch => ch.id == channel.site_id) + + return data.epg +} + +function parseStart(item) { + const [date] = item.date.split('T') + const [hours, minutes] = item.start_time.split('h') + const time = `${date} ${hours}:${minutes}` + + return dayjs.tz(time, 'YYYY-MM-DD HH:mm', 'Africa/Luanda') +}