mirror of
https://github.com/iptv-org/epg
synced 2026-04-30 06:26:59 -04:00
Replaces icon with image
This commit is contained in:
@@ -28,7 +28,7 @@ module.exports = {
|
||||
title: parseTitle(item),
|
||||
description: parseDescription(item),
|
||||
category: parseCategory(item),
|
||||
icon: parseIcon(item),
|
||||
image: parseImage(item),
|
||||
start,
|
||||
stop
|
||||
})
|
||||
@@ -62,7 +62,7 @@ module.exports = {
|
||||
}
|
||||
}
|
||||
|
||||
function parseIcon(item) {
|
||||
function parseImage(item) {
|
||||
const $ = cheerio.load(item)
|
||||
const imgSrc =
|
||||
$('.row > div.columns.small-3.large-1 > a > img').data('src') ||
|
||||
|
||||
@@ -35,7 +35,8 @@ it('can parse response (en)', () => {
|
||||
start: '2022-08-27T14:25:00.000Z',
|
||||
stop: '2022-08-27T15:15:00.000Z',
|
||||
title: 'Station 19 S5',
|
||||
icon: 'https://media.elcinema.com/uploads/_150x200_ec30d1a2251c8edf83334be4860184c74d2534d7ba508a334ad66fa59acc4926.jpg',
|
||||
image:
|
||||
'https://media.elcinema.com/uploads/_150x200_ec30d1a2251c8edf83334be4860184c74d2534d7ba508a334ad66fa59acc4926.jpg',
|
||||
category: 'Series'
|
||||
})
|
||||
})
|
||||
@@ -52,7 +53,8 @@ it('can parse response (ar)', () => {
|
||||
start: '2022-08-27T14:25:00.000Z',
|
||||
stop: '2022-08-27T15:15:00.000Z',
|
||||
title: 'Station 19 S5',
|
||||
icon: 'https://media.elcinema.com/uploads/_150x200_ec30d1a2251c8edf83334be4860184c74d2534d7ba508a334ad66fa59acc4926.jpg',
|
||||
image:
|
||||
'https://media.elcinema.com/uploads/_150x200_ec30d1a2251c8edf83334be4860184c74d2534d7ba508a334ad66fa59acc4926.jpg',
|
||||
category: 'مسلسل'
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user