mirror of
https://github.com/iptv-org/epg
synced 2026-05-07 18:07:05 -04:00
Update /sites
This commit is contained in:
@@ -1,8 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<site site="i24news.tv">
|
||||
<channels>
|
||||
<channel lang="ar" xmltv_id="I24NewsArabic.il" site_id="ar#">i24News Arabic</channel>
|
||||
<channel lang="en" xmltv_id="I24NewsEnglish.il" site_id="en#">i24News English</channel>
|
||||
<channel lang="fr" xmltv_id="I24NewsFrench.il" site_id="fr#">i24 News Français</channel>
|
||||
</channels>
|
||||
</site>
|
||||
<channels>
|
||||
<channel site="i24news.tv" lang="ar" xmltv_id="I24NewsArabic.il" site_id="ar#">i24News Arabic</channel>
|
||||
<channel site="i24news.tv" lang="en" xmltv_id="I24NewsEnglish.il" site_id="en#">i24News English</channel>
|
||||
<channel site="i24news.tv" lang="fr" xmltv_id="I24NewsFrench.il" site_id="fr#">i24 News Français</channel>
|
||||
</channels>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// npx epg-grabber --config=sites/i24news.tv/i24news.tv.config.js --channels=sites/i24news.tv/i24news.tv.channels.xml --output=guide.xml --days=2
|
||||
// npm run grab -- --site=i24news.tv
|
||||
|
||||
const { parser, url } = require('./i24news.tv.config.js')
|
||||
const dayjs = require('dayjs')
|
||||
@@ -18,7 +18,8 @@ it('can generate valid url', () => {
|
||||
})
|
||||
|
||||
it('can parse response', () => {
|
||||
const content = `[{"id":348995,"startHour":"22:30","endHour":"23:00","day":5,"firstDiffusion":false,"override":false,"show":{"parsedBody":[{"type":"text","text":"Special Edition"}],"id":131,"title":"تغطية خاصة","body":"Special Edition","slug":"Special-Edition-تغطية-خاصة","visible":true,"image":{"id":1142467,"credit":"","legend":"","href":"https://cdn.i24news.tv/uploads/a1/be/85/20/69/6f/32/1c/ed/b0/f8/5c/f6/1c/40/f9/a1be8520696f321cedb0f85cf61c40f9.png"}}},{"id":349023,"startHour":"15:00","endHour":"15:28","day":6,"firstDiffusion":false,"override":false,"show":{"parsedBody":[{"type":"text","text":"Special Edition"}],"id":131,"title":"تغطية خاصة","body":"Special Edition","slug":"Special-Edition-تغطية-خاصة","visible":true,"image":{"id":1142467,"credit":"","legend":"","href":"https://cdn.i24news.tv/uploads/a1/be/85/20/69/6f/32/1c/ed/b0/f8/5c/f6/1c/40/f9/a1be8520696f321cedb0f85cf61c40f9.png"}}}]`
|
||||
const content =
|
||||
'[{"id":348995,"startHour":"22:30","endHour":"23:00","day":5,"firstDiffusion":false,"override":false,"show":{"parsedBody":[{"type":"text","text":"Special Edition"}],"id":131,"title":"تغطية خاصة","body":"Special Edition","slug":"Special-Edition-تغطية-خاصة","visible":true,"image":{"id":1142467,"credit":"","legend":"","href":"https://cdn.i24news.tv/uploads/a1/be/85/20/69/6f/32/1c/ed/b0/f8/5c/f6/1c/40/f9/a1be8520696f321cedb0f85cf61c40f9.png"}}},{"id":349023,"startHour":"15:00","endHour":"15:28","day":6,"firstDiffusion":false,"override":false,"show":{"parsedBody":[{"type":"text","text":"Special Edition"}],"id":131,"title":"تغطية خاصة","body":"Special Edition","slug":"Special-Edition-تغطية-خاصة","visible":true,"image":{"id":1142467,"credit":"","legend":"","href":"https://cdn.i24news.tv/uploads/a1/be/85/20/69/6f/32/1c/ed/b0/f8/5c/f6/1c/40/f9/a1be8520696f321cedb0f85cf61c40f9.png"}}}]'
|
||||
const result = parser({ content, date }).map(p => {
|
||||
p.start = p.start.toJSON()
|
||||
p.stop = p.stop.toJSON()
|
||||
@@ -38,7 +39,7 @@ it('can parse response', () => {
|
||||
|
||||
it('can handle empty guide', () => {
|
||||
const result = parser({
|
||||
content: `[]`,
|
||||
content: '[]',
|
||||
date
|
||||
})
|
||||
expect(result).toMatchObject([])
|
||||
|
||||
Reference in New Issue
Block a user