Merge pull request #18 from MinePlayersPE/master

Add vidio.com
This commit is contained in:
Aleksandr Statciuk 2021-06-24 17:02:57 +03:00 committed by GitHub
commit 34d179b2e2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 104 additions and 1 deletions

View file

@ -34,7 +34,8 @@ jobs:
tv.yandex.ru, tv.yandex.ru,
tvtv.ca, tvtv.ca,
tvtv.us, tvtv.us,
tv.lv tv.lv,
vidio.com
] ]
steps: steps:
- name: Checkout - name: Checkout

View file

@ -32,6 +32,7 @@ To load a program guide, all you need to do is copy the link to one of the guide
<tr><td align="left" nowrap>🇬🇷 Greece</td><td align="left" nowrap><code>https://iptv-org.github.io/epg/guides/cosmote.gr.guide.xml</code></td></tr> <tr><td align="left" nowrap>🇬🇷 Greece</td><td align="left" nowrap><code>https://iptv-org.github.io/epg/guides/cosmote.gr.guide.xml</code></td></tr>
<tr><td align="left" nowrap>🇬🇹 Guatemala</td><td align="left" nowrap><code>https://iptv-org.github.io/epg/guides/mi.tv.guide.xml</code></td></tr> <tr><td align="left" nowrap>🇬🇹 Guatemala</td><td align="left" nowrap><code>https://iptv-org.github.io/epg/guides/mi.tv.guide.xml</code></td></tr>
<tr><td align="left" nowrap>🇭🇳 Honduras</td><td align="left" nowrap><code>https://iptv-org.github.io/epg/guides/mi.tv.guide.xml</code></td></tr> <tr><td align="left" nowrap>🇭🇳 Honduras</td><td align="left" nowrap><code>https://iptv-org.github.io/epg/guides/mi.tv.guide.xml</code></td></tr>
<tr><td align="left" nowrap>🇮🇩 Indonesia</td><td align="left" nowrap><code>https://iptv-org.github.io/epg/guides/vidio.com.guide.xml</code></td></tr>
<tr><td align="left" nowrap>🇮🇹 Italy</td><td align="left" nowrap><code>https://iptv-org.github.io/epg/guides/guidatv.sky.it.guide.xml</code></td></tr> <tr><td align="left" nowrap>🇮🇹 Italy</td><td align="left" nowrap><code>https://iptv-org.github.io/epg/guides/guidatv.sky.it.guide.xml</code></td></tr>
<tr><td align="left" nowrap>🇮🇪 Ireland</td><td align="left" nowrap><code>https://iptv-org.github.io/epg/guides/ontvtonight.com.guide.xml</code></td></tr> <tr><td align="left" nowrap>🇮🇪 Ireland</td><td align="left" nowrap><code>https://iptv-org.github.io/epg/guides/ontvtonight.com.guide.xml</code></td></tr>
<tr><td align="left" nowrap>🇰🇿 Kazakhstan</td><td align="left" nowrap><code>https://iptv-org.github.io/epg/guides/tv.yandex.ru.guide.xml</code></td></tr> <tr><td align="left" nowrap>🇰🇿 Kazakhstan</td><td align="left" nowrap><code>https://iptv-org.github.io/epg/guides/tv.yandex.ru.guide.xml</code></td></tr>

View file

@ -0,0 +1,31 @@
<?xml version="1.0" encoding="UTF-8"?>
<site site="vidio.com">
<channels>
<channel site_id="204" xmltv_id="SCTV.id">SCTV</channel>
<channel site_id="205" xmltv_id="Indosiar.id">Indosiar</channel>
<channel site_id="665" xmltv_id="RCTI.id">RCTI</channel>
<channel site_id="206" xmltv_id="OChannel.id">O Channel</channel>
<channel site_id="874" xmltv_id="KompasTV.id">Kompas TV</channel>
<channel site_id="6165" xmltv_id="BeritaSatu.id">BeritaSatu</channel>
<channel site_id="777" xmltv_id="METROTV.id">METRO TV</channel>
<channel site_id="875" xmltv_id="NET.id">NET.</channel>
<channel site_id="733" xmltv_id="TRANSTVHD.id">TRANS TV HD</channel>
<channel site_id="6441" xmltv_id="TVRINasional.id">TVRI Nasional</channel>
<channel site_id="734" xmltv_id="TRANS7HD.id">TRANS 7 HD</channel>
<channel site_id="870" xmltv_id="MNCTV.id">MNCTV</channel>
<channel site_id="778" xmltv_id="GTV.id">GTV</channel>
<channel site_id="5409" xmltv_id="iNews.id">iNews</channel>
<channel site_id="7648" xmltv_id="FoxSportsAsia.us">Fox Sports Asia</channel>
<channel site_id="6299" xmltv_id="beINSports1Asia.qa">beIN Sports 1 Asia</channel>
<channel site_id="7649" xmltv_id="FoxSports2Asia.us">Fox Sports 2 Asia</channel>
<channel site_id="7650" xmltv_id="FoxSports3Asia.us">Fox Sports 3 Asia</channel>
<channel site_id="6784" xmltv_id="ArirangTV.kr">Arirang TV</channel>
<channel site_id="6399" xmltv_id="ZeeBioskop.in">Zee Bioskop</channel>
<channel site_id="6411" xmltv_id="CNA.sg">CNA</channel>
<channel site_id="6410" xmltv_id="AlJazeeraEnglish.qa">Al Jazeera English</channel>
<channel site_id="6412" xmltv_id="Euronews.fr">Euronews</channel>
<channel site_id="5075" xmltv_id="DWEnglish.de">DW English</channel>
<channel site_id="7150" xmltv_id="ABCTV.au">ABC TV</channel>
<channel site_id="6550" xmltv_id="SmithsonianChannelAsia.us">Smithsonian Channel Asia</channel>
</channels>
</site>

70
sites/vidio.com.config.js Normal file
View file

@ -0,0 +1,70 @@
const jsdom = require('jsdom')
const { JSDOM } = jsdom
const dayjs = require('dayjs')
const utc = require('dayjs/plugin/utc')
const customParseFormat = require('dayjs/plugin/customParseFormat')
const timezone = require('dayjs/plugin/timezone')
dayjs.extend(utc)
dayjs.extend(customParseFormat)
dayjs.extend(timezone)
module.exports = {
lang: 'id',
site: 'vidio.com',
channels: 'vidio.com.channels.xml',
output: '.gh-pages/guides/vidio.com.guide.xml',
url({ channel }) {
return `https://www.vidio.com/live/${channel.site_id}/schedules`
},
parser({ content, date }) {
const programs = []
const dom = new JSDOM(content)
const scheduleDate = dom.window.document.querySelector(
'div.b-livestreaming-daily-schedule__date-label'
).textContent
const currdate = dayjs(scheduleDate)
const list = dom.window.document.querySelector(
`#schedule-content-${currdate.format(
'YYYYMMDD'
)} > .b-livestreaming-daily-schedule__scroll-container`
)
const items = list.querySelectorAll('div.b-livestreaming-daily-schedule__item')
items.forEach(item => {
const title = (
item.querySelector('div.b-livestreaming-daily-schedule__item-content-title') || {
textContent: ''
}
).textContent
const time = (
item.querySelector('div.b-livestreaming-daily-schedule__item-content-caption') || {
textContent: ''
}
).textContent
if (title && time) {
let start = dayjs.tz(
currdate.format('YYYY-MM-DD ').concat(time.substring(0, 5)),
'YYYY-MM-DD HH:mm',
'Asia/Jakarta'
)
let stop = dayjs.tz(
currdate.format('YYYY-MM-DD ').concat(time.substring(8, 13)),
'YYYY-MM-DD HH:mm',
'Asia/Jakarta'
)
if (start.diff(stop, 'h') > 0) {
stop = stop.add(1, 'day')
}
programs.push({
title,
start,
stop
})
}
})
return programs
}
}