mirror of
https://github.com/iptv-org/epg
synced 2026-09-10 22:06:56 -04:00
Update chaines-tv.orange.fr
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
const axios = require('axios')
|
||||
const dayjs = require('dayjs')
|
||||
|
||||
module.exports = {
|
||||
@@ -25,6 +26,26 @@ module.exports = {
|
||||
})
|
||||
|
||||
return programs
|
||||
},
|
||||
async channels() {
|
||||
const html = await axios
|
||||
.get(`https://chaines-tv.orange.fr/programme-tv?filtres=all`)
|
||||
.then(r => r.data)
|
||||
.catch(console.log)
|
||||
|
||||
const [, nuxtFunc] = html.match(/window\.__NUXT__=([^<]+)/) || [null, null]
|
||||
const func = new Function(`"use strict";return ${nuxtFunc}`)
|
||||
|
||||
const data = func()
|
||||
const items = data.state.channels.channels
|
||||
|
||||
return items.map(item => {
|
||||
return {
|
||||
lang: 'fr',
|
||||
site_id: item.idEPG,
|
||||
name: item.name
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user