From 6e3afe0e9441af76b4bb6962ba8cc2cde5592789 Mon Sep 17 00:00:00 2001 From: freearhey Date: Sat, 3 Apr 2021 00:39:39 +0300 Subject: [PATCH] Added guide from meo.pt --- .github/workflows/auto-update.yml | 15 +++ README.md | 1 + sites/meo.pt.channels.xml | 149 ++++++++++++++++++++++++++++++ sites/meo.pt.config.js | 58 ++++++++++++ 4 files changed, 223 insertions(+) create mode 100755 sites/meo.pt.channels.xml create mode 100644 sites/meo.pt.config.js diff --git a/.github/workflows/auto-update.yml b/.github/workflows/auto-update.yml index f5d87f85..49f03c48 100644 --- a/.github/workflows/auto-update.yml +++ b/.github/workflows/auto-update.yml @@ -4,6 +4,21 @@ on: schedule: - cron: '0 0 * * *' jobs: + meo_pt: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2.3.1 + - name: Install Dependencies + run: npm install + - name: Run EPG Grabber + run: npx epg-grabber --config=sites/meo.pt.config.js + - name: Deploy to GitHub Pages + uses: JamesIves/github-pages-deploy-action@4.1.0 + with: + branch: gh-pages + folder: .gh-pages + clean: false tvgid_ua: runs-on: ubuntu-latest steps: diff --git a/README.md b/README.md index 3f87edc1..19872ea7 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,7 @@ To load a program guide, all you need to do is copy the link to one of the guide Italianguidatv.sky.it178https://iptv-org.github.io/epg/guides/guidatv.sky.it.guide.xml Italianmediaset.it16https://iptv-org.github.io/epg/guides/mediaset.it.guide.xml Polishprogramtv.onet.pl581https://iptv-org.github.io/epg/guides/programtv.onet.pl.guide.xml + Portuguesemeo.pt144https://iptv-org.github.io/epg/guides/meo.pt.guide.xml Romanianprogrametv.ro312https://iptv-org.github.io/epg/guides/programetv.ro.guide.xml Russiantv.yandex.ru469https://iptv-org.github.io/epg/guides/tv.yandex.ru.guide.xml Spanishprogramacion-tv.elpais.com158https://iptv-org.github.io/epg/guides/programacion-tv.elpais.com.guide.xml diff --git a/sites/meo.pt.channels.xml b/sites/meo.pt.channels.xml new file mode 100755 index 00000000..a1bec7da --- /dev/null +++ b/sites/meo.pt.channels.xml @@ -0,0 +1,149 @@ + + + + 24 Horas + 24Kitchen HD Portugal + 24Kitchen Portugal + A Bola TV + AMC HD Portugal + AMC Portugal + ARTV + AXN HD Portugal + AXN Portugal + AXN White HD Portugal + AXN White Portugal + Afro Music Channel + Al Jazeera English + BBC Entertainment Europe + BabyTV Europe + Benfica TV + Benfica TV HD + Biggs + Bloomberg TV Europe + CBS Reality Europe + CCTV-4 Europe + CGTN + CMTV + CNN International Europe + Canal Hollywood HD Portugal + Canal Hollywood Portugal + Canal Panda Portugal + Canal Q + Canal180 + Cartoon Network Portugal + Caça e Pesca + Caçavision + Cinemundo + Cinemundo HD + Clubbing TV + Clubbing TV HD + Cubavisión Internacional + DW English + Discovery Channel HD Portugal + Discovery Channel Portugal + Disney Channel Portugal + Disney Junior Portugal + DogTV + E! Europe + E! HD Europe + Euronews Português + Eurosport 1 + Eurosport 1 HD + Eurosport 2 + FashionTV Europe + FashionTV HD Europe + Fox Comedy HD Portugal + Fox Comedy Portugal + Fox Crime HD Portugal + Fox Crime Portugal + Fox HD Portugal + Fox Life HD Portugal + Fox Life Portugal + Fox Movies HD Portugal + Fox Movies Portugal + Fox Portugal + France 24 English + France 24 Français + História Portugal + Hot TV + Hot TV HD + JimJam Europe + KBS World + Localvisão TV + Localvisão TV HD + MCM Pop + MCM Top + MTV HD Portugal + MTV Portugal + Mezzo + Mezzo Live HD + Más Chic Lationamérica + NBA TV HD + National Geographic HD Portugal + National Geographic Portugal + Odisseia + Phoenix CNE + Playboy TV Europe + Playboy TV HD Europe + Porto Canal + Premiere + Pro TV Internacional + RTP Açores + RTP Madeira + RTP Memória + RTP África + RTP1 + RTP2 + RTP3 + Record News + Record TV Europa + Record TV HD Europa + SET Asia + SIC + SIC Caras + SIC Mulher + SIC Notícias + SIC Radical + Sextreme + Sky News International + Sony Max UK + Sport.TV+ + Sport.TV+ HD + Sport.TV1 + Sport.TV1 HD + Sport.TV2 + Sport.TV2 HD + Sport.TV3 + Sport.TV3 HD + Sport.TV4 + Sport.TV4 HD + Sport.TV5 + Sport.TV5 HD + Sporting TV + Sporting TV HD + Stingray iConcerts + Syfy HD Portugal + Syfy Portugal + TCV Internacional + TLC Portugal + TPA Internacional + TV Canção Nova + TV5 MONDE + TVE Internacional Europa + TVG Europa + TVI + TVI Ficção + TVI24 + Toros + Trace Toca + Trace Urban + Trace Urban HD + VH1 Europe + Venus + Zee Cinema UK + Zee TV UK + i24 News English + i24 News Français + Первый канал + + \ No newline at end of file diff --git a/sites/meo.pt.config.js b/sites/meo.pt.config.js new file mode 100644 index 00000000..2b11d12c --- /dev/null +++ b/sites/meo.pt.config.js @@ -0,0 +1,58 @@ +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: 'pt', + site: 'meo.pt', + channels: 'meo.pt.channels.xml', + output: '.gh-pages/guides/meo.pt.guide.xml', + request: { + method: 'POST', + data: function ({ channel, date }) { + return { + service: 'channelsguide', + channels: [channel.site_id], + dateStart: date.format('YYYY-MM-DDT00:00:00-00:00'), + dateEnd: date.add(1, 'd').format('YYYY-MM-DDT00:00:00-00:00'), + accountID: '' + } + } + }, + logo({ content }) { + const data = parseContent(content) + return data.d.channels[0] ? data.d.channels[0].logo : null + }, + url() { + return `https://www.meo.pt/_layouts/15/Ptsi.Isites.GridTv/GridTvMng.asmx/getProgramsFromChannels` + }, + parser({ content }) { + let programs = [] + const data = parseContent(content) + const items = data.d.channels[0] ? data.d.channels[0].programs : [] + if (!items.length) return programs + + items.forEach(item => { + const title = item.name + const start = dayjs.utc(`${item.date}/${item.timeIni}`, 'D-M-YYYY/HH:mm') + const stop = dayjs.utc(`${item.date}/${item.timeEnd}`, 'D-M-YYYY/HH:mm') + + if (title && start && stop) { + programs.push({ + title, + start, + stop + }) + } + }) + + return programs + } +} + +function parseContent(content) { + return JSON.parse(content) +}