mirror of
https://github.com/iptv-org/epg.git
synced 2025-05-10 00:50:09 -04:00
Update bein.com.config.js
This commit is contained in:
parent
f09e1576f3
commit
c234766cc6
1 changed files with 6 additions and 3 deletions
|
@ -10,10 +10,12 @@ dayjs.extend(customParseFormat)
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
site: 'bein.com',
|
site: 'bein.com',
|
||||||
url: function ({ date }) {
|
url: function ({ date, channel }) {
|
||||||
|
const [index] = channel.site_id.split('#')
|
||||||
|
|
||||||
return `https://www.bein.com/en/epg-ajax-template/?action=epg_fetch&category=sports&cdate=${date.format(
|
return `https://www.bein.com/en/epg-ajax-template/?action=epg_fetch&category=sports&cdate=${date.format(
|
||||||
'YYYY-MM-DD'
|
'YYYY-MM-DD'
|
||||||
)}&language=EN&loadindex=0&mins=00&offset=0&postid=25356&serviceidentity=bein.net`
|
)}&language=EN&loadindex=${index}&mins=00&offset=0&postid=25356&serviceidentity=bein.net`
|
||||||
},
|
},
|
||||||
parser: function ({ content, channel, date }) {
|
parser: function ({ content, channel, date }) {
|
||||||
let programs = []
|
let programs = []
|
||||||
|
@ -78,7 +80,8 @@ function parseStop($item, date) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function parseItems(content, channel) {
|
function parseItems(content, channel) {
|
||||||
|
const [_, channelId] = channel.site_id.split('#')
|
||||||
const $ = cheerio.load(content)
|
const $ = cheerio.load(content)
|
||||||
|
|
||||||
return $(`#channels_${channel.site_id} .slider > ul:first-child > li`).toArray()
|
return $(`#channels_${channelId} .slider > ul:first-child > li`).toArray()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue