Repository: yt-dlp/yt-dlp
File: yt_dlp/extractor/skyit.py (Python)

Code before:
                'title': ('title', 'text', {str}),
                'description': ('description', 'html', {clean_html}),
            })),
        }


class TV8ItPlaylistIE(InfoExtractor):
    IE_DESC = 'TV8 Playlist'
    _VALID_URL = r'https?://(?:www\.)?tv8\.it/(?!video)[^/#?]+/(?P<id>[^/#?]+)'
    _TESTS = [{
        'url': 'https://tv8.it/intrattenimento/tv8-gialappas-night',
        'playlist_mincount': 32,
        'info_dict': {
            'id': 'tv8-gialappas-night',
            'title': 'Tv8 Gialappa\'s Night',
            'description': 'md5:c876039d487d9cf40229b768872718ed',
            'thumbnail': r're:^https://static\.sky\.it/.+\.(png|jpe?g|webp)',
        },
    }, {
        'url': 'https://tv8.it/sport/uefa-europa-league',
        'playlist_mincount': 11,
        'info_dict': {
            'id': 'uefa-europa-league',
            'title': 'UEFA Europa League',
            'description': 'md5:9ab1832b7a8b1705b1f590e13a36bc6a',
            'thumbnail': r're:^https://static\.sky\.it/.+\.(png|jpe?g|webp)',
        },
    }]

    def _real_extract(self, url):
        playlist_id = self._match_id(url)
        webpage = self._download_webpage(url, playlist_id)
        data = self._search_nextjs_data(webpage, playlist_id)['props']['pageProps']['data']
        entries = [self.url_result(
            urljoin('https://tv8.it', card['href']), ie=TV8ItIE,
            **traverse_obj(card, {
                'description': ('extraData', 'videoDesc', {str}),
                'id': ('extraData', 'asset_id', {str}),
                'thumbnail': ('image', 'src', {url_or_none}),
                'title': ('title', 'typography', 'text', {str}),
            }))
            for card in traverse_obj(data, ('lastContent', 'cards', lambda _, v: v['href']))]

        return self.playlist_result(entries, playlist_id, **traverse_obj(data, ('card', 'desktop', {
            'description': ('description', 'html', {clean_html}),
            'thumbnail': ('image', 'src', {url_or_none}),
            'title': ('title', 'text', {str}),
        })))


Review comment (suggestion):
```suggestion
            'thumbnail': r're:https://static\.sky\.it/.+\.(png|jpe?g|webp)',
```

Code after:
            **traverse_obj(metadata, ('info', {
                'title': ('title', 'text', {str}),
                'description': ('description', 'html', {clean_html}),
            })),
        }


class TV8ItPlaylistIE(InfoExtractor):
    IE_NAME = 'tv8.it:playlist'
    IE_DESC = 'TV8 Playlist'
    _VALID_URL = r'https?://(?:www\.)?tv8\.it/(?!video)[^/#?]+/(?P<id>[^/#?]+)'
    _TESTS = [{
        'url': 'https://tv8.it/intrattenimento/tv8-gialappas-night',
        'playlist_mincount': 32,
        'info_dict': {
            'id': 'tv8-gialappas-night',
            'title': 'Tv8 Gialappa\'s Night',
            'description': 'md5:c876039d487d9cf40229b768872718ed',
            'thumbnail': r're:https://static\.sky\.it/.+\.(png|jpe?g|webp)',
        },
    }, {
        'url': 'https://tv8.it/sport/uefa-europa-league',
        'playlist_mincount': 11,
        'info_dict': {
            'id': 'uefa-europa-league',
            'title': 'UEFA Europa League',
            'description': 'md5:9ab1832b7a8b1705b1f590e13a36bc6a',
            'thumbnail': r're:https://static\.sky\.it/.+\.(png|jpe?g|webp)',
        },
    }]

    def _real_extract(self, url):
        playlist_id = self._match_id(url)
        webpage = self._download_webpage(url, playlist_id)
        data = self._search_nextjs_data(webpage, playlist_id)['props']['pageProps']['data']
        entries = [self.url_result(
            urljoin('https://tv8.it', card['href']), ie=TV8ItIE,
            **traverse_obj(card, {
                'description': ('extraData', 'videoDesc', {str}),
                'id': ('extraData', 'asset_id', {str}),
                'thumbnail': ('image', 'src', {url_or_none}),
                'title': ('title', 'typography', 'text', {str}),
            }))
            for card in traverse_obj(data, ('lastContent', 'cards', lambda _, v: v['href']))]

        return self.playlist_result(entries, playlist_id, **traverse_obj(data, ('card', 'desktop', {
            'description': ('description', 'html', {clean_html}),
            'thumbnail': ('image', 'src', {url_or_none}),
            'title': ('title', 'text', {str}),
        })))