mirror of
https://github.com/iptv-org/epg.git
synced 2025-05-10 17:10:07 -04:00
Update dstv.com.config.js
This commit is contained in:
parent
619db0909b
commit
ab8320f4fc
1 changed files with 19 additions and 0 deletions
|
@ -1,3 +1,4 @@
|
||||||
|
const axios = require('axios')
|
||||||
const cheerio = require('cheerio')
|
const cheerio = require('cheerio')
|
||||||
const dayjs = require('dayjs')
|
const dayjs = require('dayjs')
|
||||||
const utc = require('dayjs/plugin/utc')
|
const utc = require('dayjs/plugin/utc')
|
||||||
|
@ -43,6 +44,24 @@ module.exports = {
|
||||||
})
|
})
|
||||||
|
|
||||||
return programs
|
return programs
|
||||||
|
},
|
||||||
|
async channels({ bouquet }) {
|
||||||
|
const data = await axios
|
||||||
|
.get(
|
||||||
|
`https://guide.dstv.com/api/channel/fetchChannelsByGenresInBouquet?bouquetId=${bouquet}&genre=all`
|
||||||
|
)
|
||||||
|
.then(r => r.data)
|
||||||
|
.catch(console.log)
|
||||||
|
|
||||||
|
const items = data.items
|
||||||
|
return items.map(item => {
|
||||||
|
return {
|
||||||
|
lang: 'en',
|
||||||
|
site_id: `${bouquet}#${item.channelTag}`,
|
||||||
|
name: item.channelName,
|
||||||
|
logo: item.channelLogoPaths.XLARGE
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue