mirror of
https://github.com/iptv-org/epg.git
synced 2025-05-11 09:30:06 -04:00
bein.com re-write
Re-write to grab entertainment and sport channels
This commit is contained in:
parent
e959ca3cec
commit
c845498633
5 changed files with 10649 additions and 3303 deletions
|
@ -9,13 +9,13 @@ const customParseFormat = require('dayjs/plugin/customParseFormat')
|
|||
dayjs.extend(customParseFormat)
|
||||
dayjs.extend(utc)
|
||||
|
||||
const date = dayjs.utc('2022-05-08', 'YYYY-MM-DD').startOf('d')
|
||||
const channel = { site_id: '0#1', xmltv_id: 'BeInSports.qa' }
|
||||
const date = dayjs.utc('2023-01-19', 'YYYY-MM-DD').startOf('d')
|
||||
const channel = { site_id: 'entertainment#1', xmltv_id: 'beINMovies1Premiere.qa', lang: 'en' }
|
||||
|
||||
it('can generate valid url', () => {
|
||||
const result = url({ date, channel })
|
||||
expect(result).toBe(
|
||||
'https://www.bein.com/en/epg-ajax-template/?action=epg_fetch&category=sports&cdate=2022-05-08&language=EN&loadindex=0&mins=00&offset=0&postid=25356&serviceidentity=bein.net'
|
||||
'https://www.bein.com/en/epg-ajax-template/?action=epg_fetch&category=entertainment&cdate=2023-01-19&language=EN&loadindex=0&mins=00&offset=0&postid=25356&serviceidentity=bein.net'
|
||||
)
|
||||
})
|
||||
|
||||
|
@ -28,24 +28,24 @@ it('can parse response', () => {
|
|||
})
|
||||
|
||||
expect(results[0]).toMatchObject({
|
||||
start: '2022-05-07T20:30:00.000Z',
|
||||
stop: '2022-05-07T21:00:00.000Z',
|
||||
title: 'WITHOUT RESTRICTIONS - Live Studio NEWS',
|
||||
category: 'Sports News'
|
||||
start: '2023-01-18T20:15:00.000Z',
|
||||
stop: '2023-01-18T22:15:00.000Z',
|
||||
title: 'The Walk',
|
||||
category: 'Movies'
|
||||
})
|
||||
|
||||
expect(results[1]).toMatchObject({
|
||||
start: '2022-05-07T21:00:00.000Z',
|
||||
stop: '2022-05-07T21:45:00.000Z',
|
||||
title: 'THE ISSUE OF THE WEEK - NEWS',
|
||||
category: 'Sports News'
|
||||
start: '2023-01-18T22:15:00.000Z',
|
||||
stop: '2023-01-19T00:00:00.000Z',
|
||||
title: 'Resident Evil: Welcome To Raccoon City',
|
||||
category: 'Movies'
|
||||
})
|
||||
|
||||
expect(results[54]).toMatchObject({
|
||||
start: '2022-05-08T20:30:00.000Z',
|
||||
stop: '2022-05-08T21:00:00.000Z',
|
||||
title: 'ARAB NEWS - Live Studio NEWS',
|
||||
category: 'Sports News'
|
||||
expect(results[10]).toMatchObject({
|
||||
start: '2023-01-19T15:30:00.000Z',
|
||||
stop: '2023-01-19T18:00:00.000Z',
|
||||
title: 'Spider-Man: No Way Home',
|
||||
category: 'Movies'
|
||||
})
|
||||
})
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue