mirror of
https://github.com/iptv-org/epg.git
synced 2025-05-11 09:30:06 -04:00
Update mbc.net
This commit is contained in:
parent
d1c06e52e8
commit
eea9fe9d93
3 changed files with 19 additions and 30 deletions
|
@ -1,6 +1,6 @@
|
|||
// npx epg-grabber --config=sites/mbc.net/mbc.net.config.js --channels=sites/mbc.net/mbc.net_ae.channels.xml --output=guide.xml --days=2
|
||||
|
||||
const { parser, url, logo } = require('./mbc.net.config.js')
|
||||
const { parser, url } = require('./mbc.net.config.js')
|
||||
const dayjs = require('dayjs')
|
||||
const utc = require('dayjs/plugin/utc')
|
||||
const customParseFormat = require('dayjs/plugin/customParseFormat')
|
||||
|
@ -10,8 +10,7 @@ dayjs.extend(utc)
|
|||
const date = dayjs.utc('2021-11-06', 'YYYY-MM-DD').startOf('d')
|
||||
const channel = {
|
||||
site_id: 'mbc1',
|
||||
xmltv_id: 'MBC.ae',
|
||||
logo: 'https://www.mbc.net/dam/jcr:e5e1ffbc-89b8-4400-951e-624ded8eb350/invalid-name_12@3x.png'
|
||||
xmltv_id: 'MBC.ae'
|
||||
}
|
||||
const content = `[{"id":3140240,"channelBCMId":"1","channelLabel":"MBC1","showPageTitle":"اختطاف","showPageGenreInArabic":" دراما","showPageAboutInArabic":".يستضيف برنامج تلفزيوني والدة لينا وشقيقتها، ولدى مشاهدتها الحلقة، تكتشف والدة ماجد الحقيقة، بينما تتعرض العنود لحادث سير مروع","startTime":1636155131000,"endTime":1636157806000,"startTimeInMilliseconds":1636155131000,"endTimeInMilliseconds":1636157806200,"premiereMode":"Fast Repeat","showingNow":false}]`
|
||||
|
||||
|
@ -22,13 +21,6 @@ it('can generate valid url', () => {
|
|||
)
|
||||
})
|
||||
|
||||
it('can get logo url', () => {
|
||||
const result = logo({ channel })
|
||||
expect(result).toBe(
|
||||
'https://www.mbc.net/dam/jcr:e5e1ffbc-89b8-4400-951e-624ded8eb350/invalid-name_12@3x.png'
|
||||
)
|
||||
})
|
||||
|
||||
it('can parse response', () => {
|
||||
const result = parser({ date, channel, content })
|
||||
expect(result).toMatchObject([
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue