mirror of
https://github.com/iptv-org/epg
synced 2026-09-10 13:56:51 -04:00
Update foxsports.com.au
This commit is contained in:
@@ -28,6 +28,30 @@ module.exports = {
|
||||
})
|
||||
|
||||
return programs
|
||||
},
|
||||
async channels() {
|
||||
const axios = require('axios')
|
||||
const data = await axios
|
||||
.get(
|
||||
`https://tvguide.foxsports.com.au/granite-api/programmes.json?from=${dayjs().format(
|
||||
'YYYY-MM-DD'
|
||||
)}&to=${dayjs().add(1, 'd').format('YYYY-MM-DD')}`
|
||||
)
|
||||
.then(r => r.data)
|
||||
.catch(console.log)
|
||||
|
||||
let channels = {}
|
||||
data['channel-programme'].forEach(item => {
|
||||
if (channels[item.channelId]) return
|
||||
|
||||
channels[item.channelId] = {
|
||||
lang: 'en',
|
||||
site_id: item.channelId,
|
||||
name: item.channelName
|
||||
}
|
||||
})
|
||||
|
||||
return Object.values(channels)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user