Compare commits
10 Commits
Author | SHA1 | Date | |
---|---|---|---|
2f732b6dcc | |||
1f999d1c3c | |||
3f5b36a878 | |||
f1c905f5dd | |||
d83069f300 | |||
092ad56487 | |||
cfedd1e091 | |||
7bf14e4f10 | |||
1521795dd8 | |||
645569dc97 |
@ -38,6 +38,11 @@ jobs:
|
||||
id: meta
|
||||
uses: docker/metadata-action@v5
|
||||
with:
|
||||
labels: |
|
||||
org.opencontainers.image.title=epg-info
|
||||
org.opencontainers.image.description=Docker image of https://github.com/iptv-org/epg
|
||||
org.opencontainers.image.authors=Davidquinonescl
|
||||
org.opencontainers.image.documentation=https://git.claeyscloud.com/david/epg-info-docker/src/branch/main/README.md
|
||||
images: |
|
||||
davidquinonescl/epg-info
|
||||
git.claeyscloud.com/david/epg-info
|
||||
|
5
.github/workflows/action.yml
vendored
5
.github/workflows/action.yml
vendored
@ -24,6 +24,11 @@ jobs:
|
||||
id: meta
|
||||
uses: docker/metadata-action@v5
|
||||
with:
|
||||
labels: |
|
||||
org.opencontainers.image.title=epg-info
|
||||
org.opencontainers.image.description=Docker image of https://github.com/iptv-org/epg
|
||||
org.opencontainers.image.authors=Davidquinonescl
|
||||
org.opencontainers.image.documentation=https://github.com/davidclaeysquinones/epg-info-docker/blob/main/README.md
|
||||
images: ghcr.io/davidclaeysquinones/epg-info
|
||||
tags: |
|
||||
type=semver,pattern={{raw}}
|
||||
|
38
README.md
38
README.md
@ -165,24 +165,40 @@ Sometimes a new version of this image will be bound to the same source commit. T
|
||||
- 1.0.36
|
||||
[12-31-2024 17:32](https://github.com/iptv-org/epg/commit/5ffe285c1e5882e905c5aaee672849f6f89e5cf3)
|
||||
- 1.0.37
|
||||
[09-01-2025](https://github.com/iptv-org/epg/commit/8e39af2a4d7c15f442a3e686144278e97151d46e)
|
||||
[01-09-2025](https://github.com/iptv-org/epg/commit/8e39af2a4d7c15f442a3e686144278e97151d46e)
|
||||
- 1.0.38
|
||||
[13-01-2025](https://github.com/iptv-org/epg/commit/9a565f16f4016e49d17b762477e0f6d29bb0f970)
|
||||
[01-13-2025](https://github.com/iptv-org/epg/commit/9a565f16f4016e49d17b762477e0f6d29bb0f970)
|
||||
- 1.0.39
|
||||
[14-01-2025](https://github.com/iptv-org/epg/commit/76df1541d8b0b90533ea74dcbb7815c27425b608)
|
||||
[01-14-2025](https://github.com/iptv-org/epg/commit/76df1541d8b0b90533ea74dcbb7815c27425b608)
|
||||
- 1.0.40
|
||||
[14-01-2025](https://github.com/iptv-org/epg/commit/76df1541d8b0b90533ea74dcbb7815c27425b608)<br> Fixes issue with api url
|
||||
[01-14-2025](https://github.com/iptv-org/epg/commit/76df1541d8b0b90533ea74dcbb7815c27425b608)<br> Fixes issue with api url
|
||||
- 1.0.41
|
||||
[15-01-2025](https://github.com/iptv-org/epg/commit/65331dff1c6728c3012e314e51d40da85d2d7f3c)
|
||||
[01-15-2025](https://github.com/iptv-org/epg/commit/65331dff1c6728c3012e314e51d40da85d2d7f3c)
|
||||
- 1.0.42
|
||||
[15-01-2025](https://github.com/iptv-org/epg/commit/5958c77c65a652285da64ad8a77d137306ca46d7)
|
||||
[01-15-2025](https://github.com/iptv-org/epg/commit/5958c77c65a652285da64ad8a77d137306ca46d7)
|
||||
- 1.0.43
|
||||
[20-01-2025](https://github.com/iptv-org/epg/commit/7b2cfba7f5d4df8c01ff74a7c26d7695cb750244)
|
||||
[01-20-2025](https://github.com/iptv-org/epg/commit/7b2cfba7f5d4df8c01ff74a7c26d7695cb750244)
|
||||
- 1.0.44
|
||||
[21-01-2025](https://github.com/iptv-org/epg/commit/b69d61af5e46cea4f7dcb15a00d897397c23defa)
|
||||
[01-21-2025](https://github.com/iptv-org/epg/commit/b69d61af5e46cea4f7dcb15a00d897397c23defa)
|
||||
- 1.0.45
|
||||
[23-01-2025](https://github.com/iptv-org/epg/commit/bc4b7fcfd51325cc597ccce13821f355dd0fbc72)
|
||||
[01-23-2025](https://github.com/iptv-org/epg/commit/bc4b7fcfd51325cc597ccce13821f355dd0fbc72)
|
||||
- 1.0.46
|
||||
[27-01-2025](https://github.com/iptv-org/epg/commit/a45a346ec83cae3863b8d0e1cbe7abd99d6fef36)
|
||||
[01-27-2025](https://github.com/iptv-org/epg/commit/a45a346ec83cae3863b8d0e1cbe7abd99d6fef36)
|
||||
- 1.0.47
|
||||
[29-01-2025](https://github.com/iptv-org/epg/commit/106ae083d243df825958dcf4fea1d48d2765cf72)
|
||||
[01-29-2025](https://github.com/iptv-org/epg/commit/106ae083d243df825958dcf4fea1d48d2765cf72)
|
||||
- 1.0.48
|
||||
[01-30-2025](https://github.com/iptv-org/epg/commit/e57dfaff41f498ffbfe79ecadd37f7f254dad0cc)
|
||||
- 1.0.49
|
||||
[02-02-2025](https://github.com/iptv-org/epg/commit/6b45cd9bd60058fdb7b974ad610c2d6565317f3b)
|
||||
- 1.0.50
|
||||
[02-05-2025](https://github.com/iptv-org/epg/commit/7f6849869f7182ddfa1a01b08a160ff8d2129441)
|
||||
- 1.0.51
|
||||
[02-11-2025](https://github.com/iptv-org/epg/commit/6cbe64f2dde47a3eb042cac35932989a7eefb2db)
|
||||
- 1.0.52
|
||||
[02-18-2025](https://github.com/iptv-org/epg/commit/39c4c5143e7cf7591ac49227e73e564be70c7615)
|
||||
- 1.0.53
|
||||
[02-23-2025](https://github.com/iptv-org/epg/commit/2721fe1ba06761fd06799a233dda27af6184fd17)
|
||||
- 1.0.54
|
||||
[03-07-2025](https://github.com/iptv-org/epg/commit/40c9af82d6f7f4e562cd239237fdf46a396d5728)
|
||||
- 1.0.55
|
||||
[03-11-2025](https://github.com/iptv-org/epg/commit/40c9af82d6f7f4e562cd239237fdf46a396d5728)
|
@ -2,26 +2,17 @@
|
||||
|
||||
const axios = require('axios')
|
||||
const dayjs = require('dayjs')
|
||||
const utc = require('dayjs/plugin/utc')
|
||||
|
||||
let apiVersion
|
||||
|
||||
dayjs.extend(utc)
|
||||
|
||||
module.exports = {
|
||||
site: 'pickx.be',
|
||||
days: 2,
|
||||
setApiVersion: function (version) {
|
||||
apiVersion = version
|
||||
},
|
||||
getApiVersion: function () {
|
||||
return apiVersion
|
||||
},
|
||||
fetchApiVersion: fetchApiVersion,
|
||||
url: async function ({ channel, date }) {
|
||||
async url({ channel, date }) {
|
||||
if (!apiVersion) {
|
||||
await fetchApiVersion()
|
||||
}
|
||||
|
||||
return `https://px-epg.azureedge.net/airings/${apiVersion}/${date.format(
|
||||
'YYYY-MM-DD'
|
||||
)}/channel/${channel.site_id}?timezone=Europe%2FBrussels`
|
||||
@ -51,19 +42,21 @@ module.exports = {
|
||||
episode: item.program.episodeNumber,
|
||||
actors: item.program.actors,
|
||||
director: item.program.director ? [item.program.director] : null,
|
||||
start: dayjs.utc(item.programScheduleStart),
|
||||
stop: dayjs.utc(item.programScheduleEnd)
|
||||
start: dayjs(item.programScheduleStart),
|
||||
stop: dayjs(item.programScheduleEnd)
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
return programs
|
||||
},
|
||||
async channels({ lang = '' }) {
|
||||
async channels() {
|
||||
let channels = []
|
||||
|
||||
const query = {
|
||||
operationName: 'getChannels',
|
||||
variables: {
|
||||
language: lang,
|
||||
language: 'fr',
|
||||
queryParams: {},
|
||||
id: '0',
|
||||
params: {
|
||||
@ -71,96 +64,60 @@ module.exports = {
|
||||
}
|
||||
},
|
||||
query: `query getChannels($language: String!, $queryParams: ChannelQueryParams, $id: String, $params: ChannelParams) {
|
||||
channels(language: $language, queryParams: $queryParams, id: $id, params: $params) {
|
||||
id
|
||||
channelReferenceNumber
|
||||
name
|
||||
callLetter
|
||||
number
|
||||
logo {
|
||||
key
|
||||
url
|
||||
__typename
|
||||
}
|
||||
language
|
||||
hd
|
||||
radio
|
||||
replayable
|
||||
ottReplayable
|
||||
playable
|
||||
ottPlayable
|
||||
recordable
|
||||
subscribed
|
||||
cloudRecordable
|
||||
catchUpWindowInHours
|
||||
isOttNPVREnabled
|
||||
ottNPVRStart
|
||||
subscription {
|
||||
channelRef
|
||||
subscribed
|
||||
upselling {
|
||||
upsellable
|
||||
packages
|
||||
__typename
|
||||
}
|
||||
__typename
|
||||
}
|
||||
packages
|
||||
__typename
|
||||
}
|
||||
}`
|
||||
channels(language: $language, queryParams: $queryParams, id: $id, params: $params) {
|
||||
id
|
||||
name
|
||||
language
|
||||
radio
|
||||
}
|
||||
}`
|
||||
}
|
||||
const result = await axios
|
||||
|
||||
const data = await axios
|
||||
.post('https://api.proximusmwc.be/tiams/v3/graphql', query)
|
||||
.then(r => r.data)
|
||||
.catch(console.error)
|
||||
|
||||
return (
|
||||
result?.data?.channels
|
||||
.filter(
|
||||
channel =>
|
||||
!channel.radio && (!lang || channel.language === (lang === 'de' ? 'ger' : lang))
|
||||
)
|
||||
.map(channel => {
|
||||
return {
|
||||
lang: channel.language === 'ger' ? 'de' : channel.language,
|
||||
site_id: channel.id,
|
||||
name: channel.name
|
||||
}
|
||||
}) || []
|
||||
)
|
||||
data.data.channels.forEach(channel => {
|
||||
let lang = channel.language || 'fr'
|
||||
if (channel.language === 'ger') lang = 'de'
|
||||
|
||||
channels.push({
|
||||
lang,
|
||||
site_id: channel.id,
|
||||
name: channel.name
|
||||
})
|
||||
})
|
||||
|
||||
return channels
|
||||
}
|
||||
}
|
||||
function fetchApiVersion() {
|
||||
return new Promise(async (resolve, reject) => {
|
||||
|
||||
async function fetchApiVersion() {
|
||||
const hashUrl = 'https://www.pickx.be/nl/televisie/tv-gids'
|
||||
const hashData = await axios
|
||||
.get(hashUrl)
|
||||
.then(r => {
|
||||
const re = /"hashes":\["(.*)"\]/
|
||||
const match = r.data.match(re)
|
||||
if (match && match[1]) {
|
||||
return match[1]
|
||||
} else {
|
||||
throw new Error('React app version hash not found')
|
||||
}
|
||||
})
|
||||
.catch(console.error)
|
||||
|
||||
const versionUrl = `https://www.pickx.be/api/s-${hashData}`
|
||||
const response = await axios.get(versionUrl, {
|
||||
headers: {
|
||||
Origin: 'https://www.pickx.be',
|
||||
Referer: 'https://www.pickx.be/'
|
||||
}
|
||||
})
|
||||
|
||||
return new Promise((resolve, reject) => {
|
||||
try {
|
||||
// you'll never find what happened here :)
|
||||
// load the pickx page and get the hash from the MWC configuration.
|
||||
// it's not the best way to get the version but it's the only way to get it.
|
||||
|
||||
const hashUrl = 'https://www.pickx.be/nl/televisie/tv-gids';
|
||||
|
||||
const hashData = await axios.get(hashUrl)
|
||||
.then(r => {
|
||||
const re = /"hashes":\["(.*)"\]/
|
||||
const match = r.data.match(re)
|
||||
if (match && match[1]) {
|
||||
return match[1]
|
||||
} else {
|
||||
throw new Error('React app version hash not found')
|
||||
}
|
||||
})
|
||||
.catch(console.error);
|
||||
|
||||
const versionUrl = `https://www.pickx.be/api/s-${hashData}`
|
||||
|
||||
const response = await axios.get(versionUrl, {
|
||||
headers: {
|
||||
Origin: 'https://www.pickx.be',
|
||||
Referer: 'https://www.pickx.be/'
|
||||
}
|
||||
})
|
||||
|
||||
if (response.status === 200) {
|
||||
apiVersion = response.data.version
|
||||
resolve()
|
||||
|
Reference in New Issue
Block a user