mirror of
https://github.com/iptv-org/epg.git
synced 2025-05-09 08:30:06 -04:00
Merge pull request #2671 from iptv-org/delete-cablego.com.pe
Delete cablego.com.pe
This commit is contained in:
commit
b6657aae92
6 changed files with 0 additions and 285 deletions
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1,103 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<channels>
|
||||
<channel site="cablego.com.pe" lang="es" xmltv_id="" site_id="0#AXN">AXN</channel>
|
||||
<channel site="cablego.com.pe" lang="es" xmltv_id="" site_id="0#CINECANAL">CINECANAL</channel>
|
||||
<channel site="cablego.com.pe" lang="es" xmltv_id="" site_id="0#FOXCHANNEL">STAR CHANNEL</channel>
|
||||
<channel site="cablego.com.pe" lang="es" xmltv_id="" site_id="0#QUVOTV">QUVO TV</channel>
|
||||
<channel site="cablego.com.pe" lang="es" xmltv_id="" site_id="0#SONY">SONY</channel>
|
||||
<channel site="cablego.com.pe" lang="es" xmltv_id="" site_id="0#UNIVERSAL">UNIVERSAL</channel>
|
||||
<channel site="cablego.com.pe" lang="es" xmltv_id="" site_id="1#AandEMUNDO">A&E</channel>
|
||||
<channel site="cablego.com.pe" lang="es" xmltv_id="" site_id="1#AMC">AMC</channel>
|
||||
<channel site="cablego.com.pe" lang="es" xmltv_id="" site_id="1#ANIMALPLANET">ANIMAL PLANET</channel>
|
||||
<channel site="cablego.com.pe" lang="es" xmltv_id="" site_id="1#AZCINEMA">CINEMA INOLVIDABLE</channel>
|
||||
<channel site="cablego.com.pe" lang="es" xmltv_id="" site_id="1#CloverCH">CLOVER CHANNEL</channel>
|
||||
<channel site="cablego.com.pe" lang="es" xmltv_id="" site_id="1#DISCOVERYCHANNEL">DISCOVERY CHANNEL</channel>
|
||||
<channel site="cablego.com.pe" lang="es" xmltv_id="" site_id="1#DISCOVERYSCIENCE">DISCOVERY SCIENCE</channel>
|
||||
<channel site="cablego.com.pe" lang="es" xmltv_id="" site_id="1#DISCOVERYTURBO">DISCOVERY TURBO</channel>
|
||||
<channel site="cablego.com.pe" lang="es" xmltv_id="" site_id="1#FILMSandARTS">FILMS & ARTS</channel>
|
||||
<channel site="cablego.com.pe" lang="es" xmltv_id="" site_id="1#FX">FX</channel>
|
||||
<channel site="cablego.com.pe" lang="es" xmltv_id="" site_id="1#GOLDENLATINO">GOLDEN LATINO</channel>
|
||||
<channel site="cablego.com.pe" lang="es" xmltv_id="" site_id="1#ID">ID</channel>
|
||||
<channel site="cablego.com.pe" lang="es" xmltv_id="" site_id="1#NATGEO">NATGEO</channel>
|
||||
<channel site="cablego.com.pe" lang="es" xmltv_id="" site_id="1#PARAMOUNTCH">PARAMOUNT CHANNEL</channel>
|
||||
<channel site="cablego.com.pe" lang="es" xmltv_id="" site_id="1#SONYMOVIES">SONY MOVIES</channel>
|
||||
<channel site="cablego.com.pe" lang="es" xmltv_id="" site_id="1#STUDIOUNIVERSAL">STUDIO UNIVERSAL</channel>
|
||||
<channel site="cablego.com.pe" lang="es" xmltv_id="" site_id="1#USA">USA</channel>
|
||||
<channel site="cablego.com.pe" lang="es" xmltv_id="" site_id="2#AZCLIC">CLIC</channel>
|
||||
<channel site="cablego.com.pe" lang="es" xmltv_id="" site_id="2#AZCORAZON">CORAZON</channel>
|
||||
<channel site="cablego.com.pe" lang="es" xmltv_id="" site_id="2#AZMUNDO">MUNDO</channel>
|
||||
<channel site="cablego.com.pe" lang="es" xmltv_id="" site_id="2#CHESTRELLAS">CANAL DE LAS ESTRELLAS</channel>
|
||||
<channel site="cablego.com.pe" lang="es" xmltv_id="" site_id="2#DISCOVERYKIDS">DISCOVERY KIDS</channel>
|
||||
<channel site="cablego.com.pe" lang="es" xmltv_id="" site_id="2#DISCOVERYTHEATER">DISCOVERY THEATER</channel>
|
||||
<channel site="cablego.com.pe" lang="es" xmltv_id="" site_id="2#DISCOVERYWORLD">DISCOVERY WORLD</channel>
|
||||
<channel site="cablego.com.pe" lang="es" xmltv_id="" site_id="2#DISNEYJUNIOR">DISNEY JUNIOR</channel>
|
||||
<channel site="cablego.com.pe" lang="es" xmltv_id="" site_id="2#DISTRITOCOMEDIA">DISTRITO COMEDIA</channel>
|
||||
<channel site="cablego.com.pe" lang="es" xmltv_id="" site_id="2#FOODNETWORK">FOOD NETWORK</channel>
|
||||
<channel site="cablego.com.pe" lang="es" xmltv_id="" site_id="2#GOURMET">GOURMET</channel>
|
||||
<channel site="cablego.com.pe" lang="es" xmltv_id="" site_id="2#HGTV">HGTV</channel>
|
||||
<channel site="cablego.com.pe" lang="es" xmltv_id="" site_id="2#HOMEANDHEALTH">HOME & HEALTH</channel>
|
||||
<channel site="cablego.com.pe" lang="es" xmltv_id="" site_id="2#KANALD">KANAL D</channel>
|
||||
<channel site="cablego.com.pe" lang="es" xmltv_id="" site_id="2#MASCHIC">MAS CHIC</channel>
|
||||
<channel site="cablego.com.pe" lang="es" xmltv_id="" site_id="2#TELEMUNDO">TELEMUNDO</channel>
|
||||
<channel site="cablego.com.pe" lang="es" xmltv_id="" site_id="2#TELENOVELAS">TELENOVELAS</channel>
|
||||
<channel site="cablego.com.pe" lang="es" xmltv_id="" site_id="2#TRAVELANDLIVING">TLC</channel>
|
||||
<channel site="cablego.com.pe" lang="es" xmltv_id="" site_id="2#UNIVISION">UNIVISION</channel>
|
||||
<channel site="cablego.com.pe" lang="es" xmltv_id="" site_id="3#BITME">BITME</channel>
|
||||
<channel site="cablego.com.pe" lang="es" xmltv_id="" site_id="3#CNBC">CNBC</channel>
|
||||
<channel site="cablego.com.pe" lang="es" xmltv_id="" site_id="3#DISNEYCHANNEL">DISNEY CHANNEL</channel>
|
||||
<channel site="cablego.com.pe" lang="es" xmltv_id="" site_id="3#DREAMWORKS">DREAMWORKS</channel>
|
||||
<channel site="cablego.com.pe" lang="es" xmltv_id="" site_id="3#ESPN">ESPN</channel>
|
||||
<channel site="cablego.com.pe" lang="es" xmltv_id="" site_id="3#ESPN2">ESPN2</channel>
|
||||
<channel site="cablego.com.pe" lang="es" xmltv_id="" site_id="3#ESPN3">ESPN3</channel>
|
||||
<channel site="cablego.com.pe" lang="es" xmltv_id="" site_id="3#ESPNMAS">ESPN EXTRA</channel>
|
||||
<channel site="cablego.com.pe" lang="es" xmltv_id="" site_id="3#FOXNEWS">FOX NEWS</channel>
|
||||
<channel site="cablego.com.pe" lang="es" xmltv_id="" site_id="3#FOXSPORTS">ESPN4</channel>
|
||||
<channel site="cablego.com.pe" lang="es" xmltv_id="" site_id="3#FOXSPORTS2">FOX SPORTS 2</channel>
|
||||
<channel site="cablego.com.pe" lang="es" xmltv_id="" site_id="3#FOXSPORTS3">FOX SPORTS 3</channel>
|
||||
<channel site="cablego.com.pe" lang="es" xmltv_id="" site_id="3#KARIBENA">KARIBEÑA</channel>
|
||||
<channel site="cablego.com.pe" lang="es" xmltv_id="" site_id="3#MTV">MTV</channel>
|
||||
<channel site="cablego.com.pe" lang="es" xmltv_id="" site_id="3#NICKELODEON">NICKELODEON</channel>
|
||||
<channel site="cablego.com.pe" lang="es" xmltv_id="" site_id="3#NICKJR">NICK JR</channel>
|
||||
<channel site="cablego.com.pe" lang="es" xmltv_id="" site_id="3#NICKMUSIC">NICKMUSIC</channel>
|
||||
<channel site="cablego.com.pe" lang="es" xmltv_id="" site_id="3#NOTICIASCARACOL">NOTICIAS CARACOL</channel>
|
||||
<channel site="cablego.com.pe" lang="es" xmltv_id="" site_id="3#PLIMPLIM">PLIM PLIM</channel>
|
||||
<channel site="cablego.com.pe" lang="es" xmltv_id="" site_id="3#ZOOMOO">ZOOMOO</channel>
|
||||
<channel site="cablego.com.pe" lang="es" xmltv_id="" site_id="4#AMERICATV">AMERICA TV</channel>
|
||||
<channel site="cablego.com.pe" lang="es" xmltv_id="" site_id="4#ANTENA3">ANTENA 3</channel>
|
||||
<channel site="cablego.com.pe" lang="es" xmltv_id="" site_id="4#BANDAMAX">BANDAMAX</channel>
|
||||
<channel site="cablego.com.pe" lang="es" xmltv_id="" site_id="4#BETHEL">BETHEL</channel>
|
||||
<channel site="cablego.com.pe" lang="es" xmltv_id="" site_id="4#ECH">E!</channel>
|
||||
<channel site="cablego.com.pe" lang="es" xmltv_id="" site_id="4#ENLACE">ENLACE</channel>
|
||||
<channel site="cablego.com.pe" lang="es" xmltv_id="" site_id="4#EWTN">EWTN</channel>
|
||||
<channel site="cablego.com.pe" lang="es" xmltv_id="" site_id="4#HISTORY2">HISTORY 2</channel>
|
||||
<channel site="cablego.com.pe" lang="es" xmltv_id="" site_id="4#HISTORYCHANNEL">HISTORY CHANNEL</channel>
|
||||
<channel site="cablego.com.pe" lang="es" xmltv_id="" site_id="4#IVCNETWORKS">IVC NETWORKS</channel>
|
||||
<channel site="cablego.com.pe" lang="es" xmltv_id="" site_id="4#JN19">JN19</channel>
|
||||
<channel site="cablego.com.pe" lang="es" xmltv_id="" site_id="4#LIFETIME">LIFE TIME</channel>
|
||||
<channel site="cablego.com.pe" lang="es" xmltv_id="" site_id="4#OVACION">OVACION</channel>
|
||||
<channel site="cablego.com.pe" lang="es" xmltv_id="" site_id="4#PLAYBOY">PLAYBOY</channel>
|
||||
<channel site="cablego.com.pe" lang="es" xmltv_id="" site_id="4#TELEFE">TELEFE</channel>
|
||||
<channel site="cablego.com.pe" lang="es" xmltv_id="" site_id="4#TELEHITLATINO">TELEHIT LATINO</channel>
|
||||
<channel site="cablego.com.pe" lang="es" xmltv_id="" site_id="4#TELEHITMUSICA">TELEHIT MUSICA</channel>
|
||||
<channel site="cablego.com.pe" lang="es" xmltv_id="" site_id="4#TRECEARGENTINA">TRECE ARGENTINA</channel>
|
||||
<channel site="cablego.com.pe" lang="es" xmltv_id="ATV.pe" site_id="0#ATVHD">ATV</channel>
|
||||
<channel site="cablego.com.pe" lang="es" xmltv_id="ATVPlus.pe" site_id="0#ATVMAS">ATV+</channel>
|
||||
<channel site="cablego.com.pe" lang="es" xmltv_id="BHTV.pe" site_id="0#BHTV">BHTV</channel>
|
||||
<channel site="cablego.com.pe" lang="es" xmltv_id="Conecta2TV.pe" site_id="0#CONECTA2">CONECTA2 TV</channel>
|
||||
<channel site="cablego.com.pe" lang="es" xmltv_id="CongresoTV.pe" site_id="0#CANALCONGRESO">CONGRESO TV</channel>
|
||||
<channel site="cablego.com.pe" lang="es" xmltv_id="DePeliculaLatinAmerica.mx" site_id="1#DEPELICULA">DE PELICULA</channel>
|
||||
<channel site="cablego.com.pe" lang="es" xmltv_id="EcuadorTV.ec" site_id="4#ECUADORTV">ECUADOR TV</channel>
|
||||
<channel site="cablego.com.pe" lang="es" xmltv_id="EuropaEuropa.ar" site_id="1#EUROPAEUROPA">EUROPA EUROPA</channel>
|
||||
<channel site="cablego.com.pe" lang="es" xmltv_id="ExitosaTV.pe" site_id="0#EXITOSATV">EXITOSA TV</channel>
|
||||
<channel site="cablego.com.pe" lang="es" xmltv_id="GlobalTV.pe" site_id="0#GLOBAL">GLOBAL</channel>
|
||||
<channel site="cablego.com.pe" lang="es" xmltv_id="GoldenEdgePanregional.mx" site_id="1#GOLDENEDGE">GOLDEN EDGE</channel>
|
||||
<channel site="cablego.com.pe" lang="es" xmltv_id="Latina.pe" site_id="0#LATINA">LATINA</channel>
|
||||
<channel site="cablego.com.pe" lang="es" xmltv_id="Nativa.pe" site_id="0#NATIVA">NATIVA</channel>
|
||||
<channel site="cablego.com.pe" lang="es" xmltv_id="PanamericanaTV.pe" site_id="0#PANAMERICANATV">PANAMERICANA TV</channel>
|
||||
<channel site="cablego.com.pe" lang="es" xmltv_id="PasionesLatinAmerica.us" site_id="2#PASIONES">PASIONES</channel>
|
||||
<channel site="cablego.com.pe" lang="es" xmltv_id="PBO.pe" site_id="0#PBO">PBO</channel>
|
||||
<channel site="cablego.com.pe" lang="es" xmltv_id="TVPeru.pe" site_id="0#TVPERU">TV PERU</channel>
|
||||
<channel site="cablego.com.pe" lang="es" xmltv_id="USMPTV.pe" site_id="0#USMPTV">USMP TV</channel>
|
||||
<channel site="cablego.com.pe" lang="es" xmltv_id="Venus.ar" site_id="4#VENUS">VENUS</channel>
|
||||
<channel site="cablego.com.pe" lang="es" xmltv_id="WillaxTV.pe" site_id="0#WILLAX">WILLAX</channel>
|
||||
</channels>
|
|
@ -1,108 +0,0 @@
|
|||
const dayjs = require('dayjs')
|
||||
const axios = require('axios')
|
||||
const cheerio = require('cheerio')
|
||||
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 = {
|
||||
site: 'cablego.com.pe',
|
||||
days: 2,
|
||||
request: {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'x-requested-with': 'XMLHttpRequest',
|
||||
cookie: '_nss=1'
|
||||
},
|
||||
cache: {
|
||||
ttl: 60 * 60 * 1000 // 1 hour
|
||||
}
|
||||
},
|
||||
url({ channel, date }) {
|
||||
const [page] = channel.site_id.split('#')
|
||||
|
||||
return `https://cablego.com.pe/epg/default/${date.format(
|
||||
'YYYY-MM-DD'
|
||||
)}?page=${page}&do=loadPage`
|
||||
},
|
||||
parser: function ({ content, channel, date }) {
|
||||
let programs = []
|
||||
const items = parseItems(content, channel)
|
||||
items.forEach(item => {
|
||||
const $item = cheerio.load(item)
|
||||
const prev = programs[programs.length - 1]
|
||||
let start = parseStart($item, date)
|
||||
if (!start) return
|
||||
if (prev) {
|
||||
if (start.isBefore(prev.start)) {
|
||||
start = start.add(1, 'd')
|
||||
date = date.add(1, 'd')
|
||||
}
|
||||
prev.stop = start
|
||||
}
|
||||
const stop = start.add(30, 'm')
|
||||
programs.push({
|
||||
title: parseTitle($item),
|
||||
start,
|
||||
stop
|
||||
})
|
||||
})
|
||||
|
||||
return programs
|
||||
},
|
||||
async channels() {
|
||||
const pages = [0, 1, 2, 3, 4]
|
||||
|
||||
let channels = []
|
||||
for (const page of pages) {
|
||||
const url = `https://cablego.com.pe/epg/default/${dayjs().format(
|
||||
'YYYY-MM-DD'
|
||||
)}?page=${page}&do=loadPage`
|
||||
const data = await axios
|
||||
.post(url, null, {
|
||||
headers: {
|
||||
'x-requested-with': 'XMLHttpRequest',
|
||||
cookie: '_nss=1'
|
||||
}
|
||||
})
|
||||
.then(r => r.data)
|
||||
.catch(console.log)
|
||||
|
||||
const $ = cheerio.load(data.snippets['snippet--channelGrid'])
|
||||
$('.epg-channel-strip').each((i, el) => {
|
||||
const channelId = $(el).find('.epg-channel-logo').attr('id')
|
||||
channels.push({
|
||||
lang: 'es',
|
||||
site_id: `${page}#${channelId}`,
|
||||
name: $(el).find('img').attr('alt')
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
return channels
|
||||
}
|
||||
}
|
||||
|
||||
function parseTitle($item) {
|
||||
return $item('span:nth-child(2) > a').text().trim()
|
||||
}
|
||||
|
||||
function parseStart($item, date) {
|
||||
const time = $item('.epg-show-start').text().trim()
|
||||
|
||||
return dayjs.tz(`${date.format('YYYY-MM-DD')} ${time}`, 'YYYY-MM-DD HH:mm', 'America/Lima')
|
||||
}
|
||||
|
||||
function parseItems(content, channel) {
|
||||
const [, channelId] = channel.site_id.split('#')
|
||||
const data = JSON.parse(content)
|
||||
if (!data || !data.snippets || !data.snippets['snippet--channelGrid']) return []
|
||||
const html = data.snippets['snippet--channelGrid']
|
||||
const $ = cheerio.load(html)
|
||||
|
||||
return $(`#${channelId}`).parent().find('.epg-show').toArray()
|
||||
}
|
|
@ -1,51 +0,0 @@
|
|||
const { parser, url, request } = require('./cablego.com.pe.config.js')
|
||||
const fs = require('fs')
|
||||
const path = require('path')
|
||||
const dayjs = require('dayjs')
|
||||
const utc = require('dayjs/plugin/utc')
|
||||
const customParseFormat = require('dayjs/plugin/customParseFormat')
|
||||
dayjs.extend(customParseFormat)
|
||||
dayjs.extend(utc)
|
||||
|
||||
const date = dayjs.utc('2022-11-28', 'YYYY-MM-DD').startOf('d')
|
||||
const channel = {
|
||||
site_id: '0#LATINA',
|
||||
xmltv_id: 'Latina.pe'
|
||||
}
|
||||
|
||||
it('can generate valid url', () => {
|
||||
expect(url({ channel, date })).toBe(
|
||||
'https://cablego.com.pe/epg/default/2022-11-28?page=0&do=loadPage'
|
||||
)
|
||||
})
|
||||
|
||||
it('can generate valid request method', () => {
|
||||
expect(request.method).toBe('POST')
|
||||
})
|
||||
|
||||
it('can generate valid request headers', () => {
|
||||
expect(request.headers).toMatchObject({
|
||||
'x-requested-with': 'XMLHttpRequest'
|
||||
})
|
||||
})
|
||||
|
||||
it('can parse response', () => {
|
||||
const content = fs.readFileSync(path.resolve(__dirname, '__data__/content.json'))
|
||||
let results = parser({ content, channel, date }).map(p => {
|
||||
p.start = p.start.toJSON()
|
||||
p.stop = p.stop.toJSON()
|
||||
return p
|
||||
})
|
||||
|
||||
expect(results[0]).toMatchObject({
|
||||
start: '2022-11-28T05:00:00.000Z',
|
||||
stop: '2022-11-28T06:30:00.000Z',
|
||||
title: 'Especiales Qatar'
|
||||
})
|
||||
})
|
||||
|
||||
it('can handle empty guide', () => {
|
||||
const content = fs.readFileSync(path.resolve(__dirname, '__data__/no_content.json'))
|
||||
const result = parser({ content, channel, date })
|
||||
expect(result).toMatchObject([])
|
||||
})
|
|
@ -1,21 +0,0 @@
|
|||
# cablego.com.pe
|
||||
|
||||
https://cablego.com.pe/
|
||||
|
||||
### Download the guide
|
||||
|
||||
```sh
|
||||
npm run grab --- --site=cablego.com.pe
|
||||
```
|
||||
|
||||
### Update channel list
|
||||
|
||||
```sh
|
||||
npm run channels:parse --- --config=./sites/cablego.com.pe/cablego.com.pe.config.js --output=./sites/cablego.com.pe/cablego.com.pe.channels.xml
|
||||
```
|
||||
|
||||
### Test
|
||||
|
||||
```sh
|
||||
npm test --- cablego.com.pe
|
||||
```
|
Loading…
Add table
Add a link
Reference in a new issue