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

@@ -34,7 +34,7 @@ module.exports = {
title: parseTitle($item),
description: parseDescription($item),
category: parseCategory($item),
icon: parseIcon($item),
image: parseImage($item),
start,
stop
})
@@ -85,7 +85,7 @@ function parseCategory($item) {
return $item('.type').text().trim()
}
function parseIcon($item) {
function parseImage($item) {
return $item('.image img').data('src')
}

View File

@@ -32,7 +32,7 @@ it('can parse response', () => {
stop: '2023-01-19T05:55:00.000Z',
title: 'LN Matin',
category: 'Magazine Actualité',
icon: 'https://dnsmptv-img.pragma-consult.be/imgs/picto/132/Reportage_1.jpg'
image: 'https://dnsmptv-img.pragma-consult.be/imgs/picto/132/Reportage_1.jpg'
})
expect(results[1]).toMatchObject({
@@ -40,7 +40,7 @@ it('can parse response', () => {
stop: '2023-01-19T06:00:00.000Z',
title: 'Météo',
category: 'Météo',
icon: 'https://dnsmptv-img.pragma-consult.be/imgs/picto/132/Meteo.jpg'
image: 'https://dnsmptv-img.pragma-consult.be/imgs/picto/132/Meteo.jpg'
})
expect(results[8]).toMatchObject({
@@ -49,7 +49,7 @@ it('can parse response', () => {
title: 'Le journal',
description: "L'information de la mi-journée avec des JT...",
category: 'Journal',
icon: 'https://dnsmptv-img.pragma-consult.be/imgs/picto/132/journal.jpg'
image: 'https://dnsmptv-img.pragma-consult.be/imgs/picto/132/journal.jpg'
})
})