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"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<channels>
|
<channels>
|
||||||
<channel site="i24news.tv" lang="ar" xmltv_id="i24NEWSArabic.il" site_id="ar#world">I24NEWS عربى</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#usa">I24NEWS English (USA)</channel>
|
<channel site="i24news.tv" lang="en" xmltv_id="i24NEWSEnglishUSA.il" site_id="en">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">I24NEWS Français</channel>
|
||||||
<channel site="i24news.tv" lang="fr" xmltv_id="i24NEWSFrench.il" site_id="fr#world">I24NEWS Français</channel>
|
<channel site="i24news.tv" lang="he" xmltv_id="i24NEWSHebrew.il" site_id="he">I24NEWS עברית</channel>
|
||||||
</channels>
|
</channels>
|
||||||
|
|
|
@ -11,9 +11,7 @@ module.exports = {
|
||||||
site: 'i24news.tv',
|
site: 'i24news.tv',
|
||||||
days: 2,
|
days: 2,
|
||||||
url: function ({ channel }) {
|
url: function ({ channel }) {
|
||||||
const [lang, region] = channel.site_id.split('#')
|
return `https://api.i24news.tv/v2/${channel.site_id}/schedules`
|
||||||
|
|
||||||
return `https://api.i24news.tv/v2/${lang}/schedules/${region}`
|
|
||||||
},
|
},
|
||||||
parser: function ({ content, date }) {
|
parser: function ({ content, date }) {
|
||||||
let programs = []
|
let programs = []
|
||||||
|
|
|
@ -7,12 +7,12 @@ dayjs.extend(utc)
|
||||||
|
|
||||||
const date = dayjs.utc('2022-03-06', 'YYYY-MM-DD').startOf('d')
|
const date = dayjs.utc('2022-03-06', 'YYYY-MM-DD').startOf('d')
|
||||||
const channel = {
|
const channel = {
|
||||||
site_id: 'ar#',
|
site_id: 'ar',
|
||||||
xmltv_id: 'I24NewsArabic.il'
|
xmltv_id: 'I24NewsArabic.il'
|
||||||
}
|
}
|
||||||
|
|
||||||
it('can generate valid url', () => {
|
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', () => {
|
it('can parse response', () => {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue