Compare commits
15 Commits
Author | SHA1 | Date | |
---|---|---|---|
8231301a53 | |||
2e8e8fb440 | |||
ff1928a09f | |||
1ff85a3a26 | |||
6b723e1776 | |||
8aacebad42 | |||
d388307b85 | |||
e04ec220e3 | |||
6ff94a3848 | |||
1f885bbd1c | |||
e99af0bc2b | |||
2f86d79697 | |||
0e72cce51f | |||
2b7b095419 | |||
bb828fd0eb |
22
README.md
22
README.md
@ -42,9 +42,9 @@ This the list of the provided custom fixes :
|
|||||||
|------------------|------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
|------------------|------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||||
| movistarplus.es | [davidclaeysquinones](https://github.com/davidclaeysquinones) | [PR](https://github.com/iptv-org/epg/pull/2440) pending approval |
|
| movistarplus.es | [davidclaeysquinones](https://github.com/davidclaeysquinones) | [PR](https://github.com/iptv-org/epg/pull/2440) pending approval |
|
||||||
| orangetv.es | [fraudiay79](https://github.com/fraudiay79) and [davidclaeysquinones](https://github.com/davidclaeysquinones) | PR not submitted |
|
| orangetv.es | [fraudiay79](https://github.com/fraudiay79) and [davidclaeysquinones](https://github.com/davidclaeysquinones) | PR not submitted |
|
||||||
| pickx.be | [davidclaeysquinones](https://github.com/davidclaeysquinones) and [BellezaEmporium](https://github.com/BellezaEmporium) | [PR](https://github.com/iptv-org/epg/pull/2480) pending approval |
|
| pickx.be | [davidclaeysquinones](https://github.com/davidclaeysquinones) and [BellezaEmporium](https://github.com/BellezaEmporium) | [PR](https://github.com/iptv-org/epg/pull/2480) merged since commit [296d616](https://github.com/iptv-org/epg/commit/296d6162ecbeb1b3c3e392845187d30624d50aa2) |
|
||||||
| telenet.tv | [davidclaeysquinones](https://github.com/davidclaeysquinones) | [PR](https://github.com/iptv-org/epg/pull/2429) merged since commit [fd382db](https://github.com/iptv-org/epg/commit/fd382db08da7a96150928b8dcfef115e29e661d3) |
|
| telenet.tv | [davidclaeysquinones](https://github.com/davidclaeysquinones) | [PR](https://github.com/iptv-org/epg/pull/2429) merged since commit [fd382db](https://github.com/iptv-org/epg/commit/fd382db08da7a96150928b8dcfef115e29e661d3) |
|
||||||
| web.magentatv.de | [klausellus-wallace](https://github.com/klausellus-wallace) | [PR](https://github.com/iptv-org/epg/pull/2458) pending approval |
|
| web.magentatv.de | [klausellus-wallace](https://github.com/klausellus-wallace) | [PR](https://github.com/iptv-org/epg/pull/2458) merged since commit [61afe09](https://github.com/iptv-org/epg/commit/61afe090b6e7892cc5426457d960e9452222f885) |
|
||||||
|
|
||||||
If for some reason you want to include your own provider fixes this is possible by creation a mapping in the `/fixes` folder.<br>
|
If for some reason you want to include your own provider fixes this is possible by creation a mapping in the `/fixes` folder.<br>
|
||||||
The expected structure is */fixes/`provider_name`/`provider_name`.config.js*.<br>
|
The expected structure is */fixes/`provider_name`/`provider_name`.config.js*.<br>
|
||||||
@ -133,4 +133,20 @@ Sometimes a new version of this image will be bound to the same source commit. T
|
|||||||
- 1.0.20
|
- 1.0.20
|
||||||
[11-28-2024](https://github.com/iptv-org/epg/commit/da18b70ddb1c3950e5a315411fd9aeaf60b6092c)
|
[11-28-2024](https://github.com/iptv-org/epg/commit/da18b70ddb1c3950e5a315411fd9aeaf60b6092c)
|
||||||
- 1.0.21
|
- 1.0.21
|
||||||
[11-28-2024](https://github.com/iptv-org/epg/commit/da18b70ddb1c3950e5a315411fd9aeaf60b6092c)<br>Add orangetv.es
|
[11-28-2024](https://github.com/iptv-org/epg/commit/da18b70ddb1c3950e5a315411fd9aeaf60b6092c)<br>Add orangetv.es
|
||||||
|
- 1.0.22
|
||||||
|
[11-30-2024](https://github.com/iptv-org/epg/commit/1883338c0aee9909ac4567312b25701d10a765f2)
|
||||||
|
- 1.0.23
|
||||||
|
[12-02-2024](https://github.com/iptv-org/epg/commit/296d6162ecbeb1b3c3e392845187d30624d50aa2)
|
||||||
|
- 1.0.24
|
||||||
|
[12-02-2024](https://github.com/iptv-org/epg/commit/296d6162ecbeb1b3c3e392845187d30624d50aa2)<br>Fix for movistarplus.es channel grabber
|
||||||
|
- 1.0.25
|
||||||
|
[12-04-2024](https://github.com/iptv-org/epg/commit/864e0ac2c4761d926b203a85a382a4bdc87fbc17)
|
||||||
|
- 1.0.26
|
||||||
|
[12-05-2024](https://github.com/iptv-org/epg/commit/581441834af6f089c3930ad2d7ff1de2c701a6d9)
|
||||||
|
- 1.0.27
|
||||||
|
[12-07-2024](https://github.com/iptv-org/epg/commit/ce4f3e69358385d1fb8e79df8129c63d6314a802)
|
||||||
|
- 1.0.28
|
||||||
|
[12-08-2024](https://github.com/iptv-org/epg/commit/f9c8fc1b2dd63465564aba0c720096574980c58f)
|
||||||
|
- 1.0.29
|
||||||
|
[12-11-2024](https://github.com/iptv-org/epg/commit/581f5e0ca94bd6d05c33f53951df078d702b2510)
|
@ -58,8 +58,37 @@ module.exports = {
|
|||||||
|
|
||||||
return programs
|
return programs
|
||||||
},
|
},
|
||||||
|
async channels() {
|
||||||
|
const axios = require('axios')
|
||||||
|
//const dayjs = require('dayjs')
|
||||||
|
const data = await axios
|
||||||
|
.post(`${API_PROGRAM_ENDPOINT}/wp-admin/admin-ajax.php`,
|
||||||
|
{
|
||||||
|
action: 'getChannels',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
headers: {
|
||||||
|
Origin: API_PROGRAM_ENDPOINT,
|
||||||
|
Referer: `${API_PROGRAM_ENDPOINT}/programacion/`,
|
||||||
|
"Content-Type" : 'application/x-www-form-urlencoded; charset=UTF-8',
|
||||||
|
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.130 Safari/537.36 Edg/79.0.309.71'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
)
|
||||||
|
.then(r => r.data)
|
||||||
|
.catch(console.log)
|
||||||
|
|
||||||
|
return Object.values(data).map(item => {
|
||||||
|
return {
|
||||||
|
lang: 'es',
|
||||||
|
site_id: item.cod_cadena_tv,
|
||||||
|
name: item.des_cadena_tv
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function parseIcon(item, channel) {
|
function parseIcon(item, channel) {
|
||||||
if(item.cod_elemento_emision)
|
if(item.cod_elemento_emision)
|
||||||
{
|
{
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
<channels>
|
<channels>
|
||||||
<channel site="orangetv.es" lang="es" xmltv_id="La1.es" site_id="1010">LA 1 HD</channel>
|
<channel site="orangetv.es" lang="es" xmltv_id="La1.es" site_id="1010">LA 1 HD</channel>
|
||||||
<channel site="orangetv.es" lang="es" xmltv_id="La2.es" site_id="1062">La 2 HD</channel>
|
<channel site="orangetv.es" lang="es" xmltv_id="La2.es" site_id="1062">La 2 HD</channel>
|
||||||
<channel site="orangetv.es" lang="es" xmltv_id="24Horas.es" site_id="12051">24h horas</channel>
|
<channel site="orangetv.es" lang="es" xmltv_id="24Horas.es" site_id="12051">24 Horas</channel>
|
||||||
<channel site="orangetv.es" lang="es" xmltv_id="Teledeporte.es" site_id="1063">TDP HD</channel>
|
<channel site="orangetv.es" lang="es" xmltv_id="Teledeporte.es" site_id="1063">TDP HD</channel>
|
||||||
<channel site="orangetv.es" lang="es" xmltv_id="Clan.es" site_id="1064">Clan HD</channel>
|
<channel site="orangetv.es" lang="es" xmltv_id="Clan.es" site_id="1064">Clan HD</channel>
|
||||||
<channel site="orangetv.es" lang="es" xmltv_id="Antena3.es" site_id="1011">Antena 3 HD</channel>
|
<channel site="orangetv.es" lang="es" xmltv_id="Antena3.es" site_id="1011">Antena 3 HD</channel>
|
||||||
@ -82,7 +82,7 @@
|
|||||||
<channel site="orangetv.es" lang="es" xmltv_id="IB3.es" site_id="2013">IB3 HD</channel>
|
<channel site="orangetv.es" lang="es" xmltv_id="IB3.es" site_id="2013">IB3 HD</channel>
|
||||||
<channel site="orangetv.es" lang="es" xmltv_id="TelevisionCanaria.es" site_id="2059">RTV Canaria HD</channel>
|
<channel site="orangetv.es" lang="es" xmltv_id="TelevisionCanaria.es" site_id="2059">RTV Canaria HD</channel>
|
||||||
<channel site="orangetv.es" lang="es" xmltv_id="ETB1.es" site_id="2014">ETB1 HD</channel>
|
<channel site="orangetv.es" lang="es" xmltv_id="ETB1.es" site_id="2014">ETB1 HD</channel>
|
||||||
<channel site="orangetv.es" lang="es" xmltv_id="ETB2.es" site_id="2045">ETB2 HD</channel>
|
<channel site="orangetv.es" lang="es" xmltv_id="ETB2.es" site_id="1037">ETB2 HD</channel>
|
||||||
<channel site="orangetv.es" lang="es" xmltv_id="ETB3.es" site_id="2032">ETB3</channel>
|
<channel site="orangetv.es" lang="es" xmltv_id="ETB3.es" site_id="2032">ETB3</channel>
|
||||||
<channel site="orangetv.es" lang="es" xmltv_id="ETB4.es" site_id="2037">ETB4</channel>
|
<channel site="orangetv.es" lang="es" xmltv_id="ETB4.es" site_id="2037">ETB4</channel>
|
||||||
<channel site="orangetv.es" lang="es" xmltv_id="ETBBasque.es" site_id="1037">ETB Basque</channel>
|
<channel site="orangetv.es" lang="es" xmltv_id="ETBBasque.es" site_id="1037">ETB Basque</channel>
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
// for now the source code can be found at https://github.com/davidclaeysquinones/epg/tree/orangetv.orange.es
|
// for now the source code can be found at https://github.com/davidclaeysquinones/epg/tree/orangetv.orange.es
|
||||||
|
|
||||||
const dayjs = require('dayjs')
|
const dayjs = require('dayjs')
|
||||||
|
const axios = require('axios')
|
||||||
|
|
||||||
const API_PROGRAM_ENDPOINT = 'https://epg.orangetv.orange.es/epg/Smartphone_Android/1_PRO'
|
const API_PROGRAM_ENDPOINT = 'https://epg.orangetv.orange.es/epg/Smartphone_Android/1_PRO'
|
||||||
const API_CHANNEL_ENDPOINT = 'https://pc.orangetv.orange.es/pc/api/rtv/v1/GetChannelList?bouquet_id=1&model_external_id=PC&filter_unsupported_channels=false&client=json'
|
const API_CHANNEL_ENDPOINT = 'https://pc.orangetv.orange.es/pc/api/rtv/v1/GetChannelList?bouquet_id=1&model_external_id=PC&filter_unsupported_channels=false&client=json'
|
||||||
@ -21,9 +22,34 @@ module.exports = {
|
|||||||
url({ date }) {
|
url({ date }) {
|
||||||
return `${API_PROGRAM_ENDPOINT}/${date.format('YYYYMMDD')}_8h_1.json`
|
return `${API_PROGRAM_ENDPOINT}/${date.format('YYYYMMDD')}_8h_1.json`
|
||||||
},
|
},
|
||||||
parser: function ({ content, channel }) {
|
async parser({ content, channel, date }) {
|
||||||
|
let items = []
|
||||||
|
|
||||||
|
const promises = [
|
||||||
|
axios.get(
|
||||||
|
`${API_PROGRAM_ENDPOINT}/${date.format('YYYYMMDD')}_8h_1.json`,
|
||||||
|
),
|
||||||
|
axios.get(
|
||||||
|
`${API_PROGRAM_ENDPOINT}/${date.format('YYYYMMDD')}_8h_2.json`,
|
||||||
|
),
|
||||||
|
axios.get(
|
||||||
|
`${API_PROGRAM_ENDPOINT}/${date.format('YYYYMMDD')}_8h_3.json`,
|
||||||
|
),
|
||||||
|
]
|
||||||
|
|
||||||
|
await Promise.all(promises)
|
||||||
|
.then(results => {
|
||||||
|
results.forEach(r => {
|
||||||
|
const responseContent = r.data
|
||||||
|
items = items.concat(parseItems(responseContent, channel))
|
||||||
|
})
|
||||||
|
})
|
||||||
|
.catch(console.error)
|
||||||
|
|
||||||
|
// remove duplicates
|
||||||
|
items = items.filter((item, index) => items.findIndex(oi => oi.id === item.id) === index);
|
||||||
|
|
||||||
let programs = []
|
let programs = []
|
||||||
const items = parseItems(content, channel)
|
|
||||||
items.forEach(item => {
|
items.forEach(item => {
|
||||||
programs.push({
|
programs.push({
|
||||||
title: item.name,
|
title: item.name,
|
||||||
@ -69,7 +95,7 @@ function parseIcon(item){
|
|||||||
}
|
}
|
||||||
|
|
||||||
function parseItems(content, channel) {
|
function parseItems(content, channel) {
|
||||||
const json = typeof content === 'string' ? JSON.parse(content) : content
|
const json = typeof content === 'string' ? JSON.parse(content) : typeof content === 'object' ? content : []
|
||||||
|
|
||||||
const channelData = json.find(i => i.channelExternalId == channel.site_id);
|
const channelData = json.find(i => i.channelExternalId == channel.site_id);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user