mirror of
https://github.com/iptv-org/epg.git
synced 2025-05-10 00:50:09 -04:00
Merge pull request #2524 from iptv-org/bellezaemporium/fixes/i24news
[Fix] i24news.tv
This commit is contained in:
commit
f7eefb173e
3 changed files with 7 additions and 9 deletions
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<channels>
|
||||
<channel site="i24news.tv" lang="ar" xmltv_id="i24NEWSArabic.il" site_id="ar#world">I24NEWS عربى</channel>
|
||||
<channel site="i24news.tv" lang="en" xmltv_id="i24NEWSEnglishUSA.il" site_id="en#usa">I24NEWS English (USA)</channel>
|
||||
<channel site="i24news.tv" lang="en" xmltv_id="i24NEWSEnglishWorld.il" site_id="en#world">I24NEWS English (World)</channel>
|
||||
<channel site="i24news.tv" lang="fr" xmltv_id="i24NEWSFrench.il" site_id="fr#world">I24NEWS Français</channel>
|
||||
<channel site="i24news.tv" lang="ar" xmltv_id="i24NEWSArabic.il" site_id="ar">I24NEWS عربى</channel>
|
||||
<channel site="i24news.tv" lang="en" xmltv_id="i24NEWSEnglishUSA.il" site_id="en">I24NEWS English (USA)</channel>
|
||||
<channel site="i24news.tv" lang="fr" xmltv_id="i24NEWSFrench.il" site_id="fr">I24NEWS Français</channel>
|
||||
<channel site="i24news.tv" lang="he" xmltv_id="i24NEWSHebrew.il" site_id="he">I24NEWS עברית</channel>
|
||||
</channels>
|
||||
|
|
|
@ -11,9 +11,7 @@ module.exports = {
|
|||
site: 'i24news.tv',
|
||||
days: 2,
|
||||
url: function ({ channel }) {
|
||||
const [lang, region] = channel.site_id.split('#')
|
||||
|
||||
return `https://api.i24news.tv/v2/${lang}/schedules/${region}`
|
||||
return `https://api.i24news.tv/v2/${channel.site_id}/schedules`
|
||||
},
|
||||
parser: function ({ content, date }) {
|
||||
let programs = []
|
||||
|
|
|
@ -7,12 +7,12 @@ dayjs.extend(utc)
|
|||
|
||||
const date = dayjs.utc('2022-03-06', 'YYYY-MM-DD').startOf('d')
|
||||
const channel = {
|
||||
site_id: 'ar#',
|
||||
site_id: 'ar',
|
||||
xmltv_id: 'I24NewsArabic.il'
|
||||
}
|
||||
|
||||
it('can generate valid url', () => {
|
||||
expect(url({ channel })).toBe('https://api.i24news.tv/v2/ar/schedules/world')
|
||||
expect(url({ channel })).toBe('https://api.i24news.tv/v2/ar/schedules')
|
||||
})
|
||||
|
||||
it('can parse response', () => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue