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

@@ -33,7 +33,7 @@ module.exports = {
title: parseTitle($item),
sub_title: parseSubTitle($item),
description: parseDescription($item),
icon: parseIcon($item),
image: parseImage($item),
start,
stop
})
@@ -55,7 +55,7 @@ function parseDescription($item) {
return $item('.show-title > p').text().trim()
}
function parseIcon($item) {
function parseImage($item) {
const url = $item('.show-img > img').attr('src')
return url ? `https:${url}` : null

View File

@@ -29,7 +29,7 @@ it('can parse response', () => {
sub_title: 'Challenge Cup Sudden Death Round 2',
description:
'Nine anglers race to a target weight on Lake Wylie in the Lucas Oil Challenge Cup, presented by B&W Trailer Hitches, Rock Hill, South Carolina. Only four will move on to the Championship Round.',
icon: 'https://content.osgnetworks.tv/shows/major-league-fishing-thumbnail.jpg'
image: 'https://content.osgnetworks.tv/shows/major-league-fishing-thumbnail.jpg'
})
expect(results[41]).toMatchObject({
@@ -39,7 +39,7 @@ it('can parse response', () => {
sub_title: 'Flint Wilderness Walleye',
description:
'Mark Romanack and Bryan Darland fish walleye on Klotz Lake in the famed Flint Wilderness of Ontario',
icon: 'https://content.osgnetworks.tv/shows/fishin-411-thumbnail.jpg'
image: 'https://content.osgnetworks.tv/shows/fishin-411-thumbnail.jpg'
})
})