Replaces icon with image

This commit is contained in:
freearhey
2024-06-24 16:49:35 +03:00
parent 0eaff54a31
commit bb6771f539
170 changed files with 428 additions and 351 deletions

View File

@@ -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') ||

View File

@@ -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: 'مسلسل'
})
})