mirror of
https://github.com/iptv-org/epg.git
synced 2025-05-09 16:40:07 -04:00
Update /sites
This commit is contained in:
parent
ca254a6df0
commit
c0cfcf7a47
543 changed files with 30781 additions and 31187 deletions
|
@ -1,8 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<site site="kan.org.il">
|
||||
<channels>
|
||||
<channel lang="he" xmltv_id="Kan11.il" site_id="1">כאן 11</channel>
|
||||
<channel lang="he" xmltv_id="KanEducational.il" site_id="19">חינוכית</channel>
|
||||
<channel lang="ar" xmltv_id="Makan33.il" site_id="2">مكان</channel>
|
||||
</channels>
|
||||
</site>
|
||||
<channels>
|
||||
<channel site="kan.org.il" lang="ar" xmltv_id="Makan33.il" site_id="2">مكان</channel>
|
||||
<channel site="kan.org.il" lang="he" xmltv_id="Kan11.il" site_id="1">כאן 11</channel>
|
||||
<channel site="kan.org.il" lang="he" xmltv_id="KanEducational.il" site_id="19">חינוכית</channel>
|
||||
</channels>
|
||||
|
|
|
@ -8,7 +8,6 @@ dayjs.extend(timezone)
|
|||
dayjs.extend(customParseFormat)
|
||||
|
||||
module.exports = {
|
||||
skip: true, // INFO: Request failed with status code 403 (Access denied)
|
||||
site: 'kan.org.il',
|
||||
days: 2,
|
||||
url: function ({ channel, date }) {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// npx epg-grabber --config=sites/kan.org.il/kan.org.il.config.js --channels=sites/kan.org.il/kan.org.il.channels.xml --output=guide.xml --days=2
|
||||
// npm run grab -- --site=kan.org.il
|
||||
|
||||
const { parser, url } = require('./kan.org.il.config.js')
|
||||
const dayjs = require('dayjs')
|
||||
|
@ -20,7 +20,8 @@ it('can generate valid url', () => {
|
|||
})
|
||||
|
||||
it('can parse response', () => {
|
||||
const content = `[{"title":"ארץ מולדת - בין תורכיה לבריטניה","start_time":"2022-03-06T00:05:37","end_time":"2022-03-06T00:27:12","id":"2598","age_category_desc":"0","epg_name":"ארץ מולדת","title1":"ארץ מולדת - בין תורכיה לבריטניה","chapter_number":"9","live_desc":"קבוצת תלמידים מתארגנת בפרוץ מלחמת העולם הראשונה להגיש עזרה לישוב. באמצעות התלמידים לומד הצופה על בעיותיו של הישוב בתקופת המלחמה, והתלבטותו בין נאמנות לשלטון העות'מאני לבין תקוותיו מהבריטים הכובשים.","Station_Radio":"0","Station_Id":"20","stationUrlScheme":"kan11://plugin/?type=player&plugin_identifier=kan_player&ds=general-provider%3A%2F%2FfetchData%3Ftype%3DFEED_JSON%26url%3DaHR0cHM6Ly93d3cua2FuLm9yZy5pbC9hcHBLYW4vbGl2ZVN0YXRpb25zLmFzaHg%3D&id=4","program_code":"3671","picture_code":"https://kanweb.blob.core.windows.net/download/pictures/2021/1/20/imgid=45847_Z.jpeg","program_image":"","station_image":"Logo_Image_Logo20_img__8.jpg","program_id":"","timezone":"2"}]`
|
||||
const content =
|
||||
'[{"title":"ארץ מולדת - בין תורכיה לבריטניה","start_time":"2022-03-06T00:05:37","end_time":"2022-03-06T00:27:12","id":"2598","age_category_desc":"0","epg_name":"ארץ מולדת","title1":"ארץ מולדת - בין תורכיה לבריטניה","chapter_number":"9","live_desc":"קבוצת תלמידים מתארגנת בפרוץ מלחמת העולם הראשונה להגיש עזרה לישוב. באמצעות התלמידים לומד הצופה על בעיותיו של הישוב בתקופת המלחמה, והתלבטותו בין נאמנות לשלטון העות\'מאני לבין תקוותיו מהבריטים הכובשים.","Station_Radio":"0","Station_Id":"20","stationUrlScheme":"kan11://plugin/?type=player&plugin_identifier=kan_player&ds=general-provider%3A%2F%2FfetchData%3Ftype%3DFEED_JSON%26url%3DaHR0cHM6Ly93d3cua2FuLm9yZy5pbC9hcHBLYW4vbGl2ZVN0YXRpb25zLmFzaHg%3D&id=4","program_code":"3671","picture_code":"https://kanweb.blob.core.windows.net/download/pictures/2021/1/20/imgid=45847_Z.jpeg","program_image":"","station_image":"Logo_Image_Logo20_img__8.jpg","program_id":"","timezone":"2"}]'
|
||||
const result = parser({ content }).map(p => {
|
||||
p.start = p.start.toJSON()
|
||||
p.stop = p.stop.toJSON()
|
||||
|
@ -41,7 +42,7 @@ it('can parse response', () => {
|
|||
|
||||
it('can handle empty guide', () => {
|
||||
const result = parser({
|
||||
content: `[]`
|
||||
content: '[]'
|
||||
})
|
||||
expect(result).toMatchObject([])
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue