Added guide from tvtv.us

This commit is contained in:
freearhey 2021-04-10 03:52:10 +03:00
parent b7651357e4
commit 0def3ae179
4 changed files with 5761 additions and 3802 deletions

View file

@ -4,6 +4,21 @@ on:
schedule: schedule:
- cron: '0 0 * * *' - cron: '0 0 * * *'
jobs: jobs:
tvtv_us:
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/tvtv.us.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
mi_tv: mi_tv:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:

View file

@ -13,6 +13,7 @@ To load a program guide, all you need to do is copy the link to one of the guide
<tbody> <tbody>
<tr><td align="left">Czech</td><td align="left" nowrap><a href="https://m.tv.sms.cz/">m.tv.sms.cz</a></td><td align="right">629</td><td align="left" nowrap><code>https://iptv-org.github.io/epg/guides/m.tv.sms.cz.guide.xml</code></td></tr> <tr><td align="left">Czech</td><td align="left" nowrap><a href="https://m.tv.sms.cz/">m.tv.sms.cz</a></td><td align="right">629</td><td align="left" nowrap><code>https://iptv-org.github.io/epg/guides/m.tv.sms.cz.guide.xml</code></td></tr>
<tr><td align="left">English</td><td align="left" nowrap><a href="https://www.ontvtonight.com/uk/guide/">ontvtonight.com</a></td><td align="right">122</td><td align="left" nowrap><code>https://iptv-org.github.io/epg/guides/ontvtonight.com.guide.xml</code></td></tr> <tr><td align="left">English</td><td align="left" nowrap><a href="https://www.ontvtonight.com/uk/guide/">ontvtonight.com</a></td><td align="right">122</td><td align="left" nowrap><code>https://iptv-org.github.io/epg/guides/ontvtonight.com.guide.xml</code></td></tr>
<tr><td align="left">English</td><td align="left" nowrap><a href="https://www.tvtv.us/">tvtv.us</a></td><td align="right">5715</td><td align="left" nowrap><code>https://iptv-org.github.io/epg/guides/tvtv.us.guide.xml</code></td></tr>
<tr><td align="left">French</td><td align="left" nowrap><a href="https://www.programme-tv.net/">programme-tv.net</a></td><td align="right">266</td><td align="left" nowrap><code>https://iptv-org.github.io/epg/guides/programme-tv.net.guide.xml</code></td></tr> <tr><td align="left">French</td><td align="left" nowrap><a href="https://www.programme-tv.net/">programme-tv.net</a></td><td align="right">266</td><td align="left" nowrap><code>https://iptv-org.github.io/epg/guides/programme-tv.net.guide.xml</code></td></tr>
<tr><td align="left">Greek</td><td align="left" nowrap><a href="https://www.cosmote.gr/cosmotetv/residential/program">cosmote.gr</a></td><td align="right">91</td><td align="left" nowrap><code>https://iptv-org.github.io/epg/guides/cosmote.gr.guide.xml</code></td></tr> <tr><td align="left">Greek</td><td align="left" nowrap><a href="https://www.cosmote.gr/cosmotetv/residential/program">cosmote.gr</a></td><td align="right">91</td><td align="left" nowrap><code>https://iptv-org.github.io/epg/guides/cosmote.gr.guide.xml</code></td></tr>
<tr><td align="left">Italian</td><td align="left" nowrap><a href="https://guidatv.sky.it/canali">guidatv.sky.it</a></td><td align="right">178</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">Italian</td><td align="left" nowrap><a href="https://guidatv.sky.it/canali">guidatv.sky.it</a></td><td align="right">178</td><td align="left" nowrap><code>https://iptv-org.github.io/epg/guides/guidatv.sky.it.guide.xml</code></td></tr>

File diff suppressed because it is too large Load diff

34
sites/tvtv.us.config.js Normal file
View file

@ -0,0 +1,34 @@
const dayjs = require('dayjs')
const utc = require('dayjs/plugin/utc')
dayjs.extend(utc)
module.exports = {
lang: 'en',
site: 'tvtv.us',
channels: 'tvtv.us.channels.xml',
output: '.gh-pages/guides/tvtv.us.guide.xml',
url: function ({ date, channel }) {
return `https://www.tvtv.us/tvm/t/tv/v4/stations/${
channel.site_id
}/listings?start=${date.format()}&end=${date.add(1, 'd').format()}`
},
parser: function ({ content }) {
let programs = []
const items = JSON.parse(content)
if (!items.length) return programs
items.forEach(item => {
const start = dayjs.utc(item.listDateTime)
const stop = start.add(item.duration, 'm')
programs.push({
title: item.showName,
description: item.description,
category: item.showType,
start: start.toString(),
stop: stop.toString()
})
})
return programs
}
}