Update tva.tv
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
// node ./scripts/channels.js --config=./sites/tva.tv/tva.tv.config.js --output=./sites/tva.tv/tva.tv_ir.channels.xml
|
||||
// npx epg-grabber --config=sites/tva.tv/tva.tv.config.js --channels=sites/tva.tv/tva.tv_ir.channels.xml --output=.gh-pages/guides/ir/tva.tv.epg.xml --timeout=30000 --days=2
|
||||
|
||||
const { parser, url, logo } = require('./tva.tv.config.js')
|
||||
const { parser, url } = require('./tva.tv.config.js')
|
||||
const dayjs = require('dayjs')
|
||||
const utc = require('dayjs/plugin/utc')
|
||||
const customParseFormat = require('dayjs/plugin/customParseFormat')
|
||||
@@ -11,8 +11,7 @@ dayjs.extend(utc)
|
||||
const date = dayjs.utc('2021-11-25', 'YYYY-MM-DD').startOf('d')
|
||||
const channel = {
|
||||
site_id: '6fcc0a2e-1135-482c-b054-08a96e68b758',
|
||||
xmltv_id: 'IRIB2.ir',
|
||||
logo: 'https://s3.ott.tva.tv/rosing-tva-production/bec73f72f63958fc6998_512x512c.png'
|
||||
xmltv_id: 'IRIB2.ir'
|
||||
}
|
||||
const content = `{"data":[{"id":"c0667229-eaf8-472f-8ba7-ad4417348baf","start_at":"2021-11-24T00:20:39.000Z","end_at":"2021-11-24T00:32:11.000Z","description":"تلفن های شبکه 5 سیما: تلفن: 23511000 -تلفن گویا:2786500 نمابر:23511289","name":"میان برنامه","subtitle":"","season_number":null,"episode_number":null,"channel_id":"6fcc0a2e-1135-482c-b054-08a96e68b758","program_id":"e495c06e-80de-46ee-9120-619631f554d9","competition_id":null,"object":"program_event","cast_members":[],"genres":[],"images":[],"program_type":null,"certification_ratings":[]}]}`
|
||||
|
||||
@@ -22,12 +21,6 @@ it('can generate valid url', () => {
|
||||
)
|
||||
})
|
||||
|
||||
it('can generate valid logo url', () => {
|
||||
expect(logo({ channel })).toBe(
|
||||
'https://s3.ott.tva.tv/rosing-tva-production/bec73f72f63958fc6998_512x512c.png'
|
||||
)
|
||||
})
|
||||
|
||||
it('can parse response', () => {
|
||||
const result = parser({ content, channel, date }).map(p => {
|
||||
p.start = p.start.toJSON()
|
||||
|
||||
Reference in New Issue
Block a user