mirror of
				https://github.com/yt-dlp/yt-dlp.git
				synced 2025-11-04 00:20:47 +00:00 
			
		
		
		
	[ceskatelevize] Simplify, restore bonus video test and skip georestricted test (Closes #9431)
This commit is contained in:
		@@ -32,19 +32,34 @@ class CeskaTelevizeIE(InfoExtractor):
 | 
			
		||||
            # m3u8 download
 | 
			
		||||
            'skip_download': True,
 | 
			
		||||
        },
 | 
			
		||||
    }, {
 | 
			
		||||
        'url': 'http://www.ceskatelevize.cz/ivysilani/10441294653-hyde-park-civilizace/215411058090502/bonus/20641-bonus-01-en',
 | 
			
		||||
        'info_dict': {
 | 
			
		||||
            'id': '61924494877028507',
 | 
			
		||||
            'ext': 'mp4',
 | 
			
		||||
            'title': 'Hyde Park Civilizace: Bonus 01 - En',
 | 
			
		||||
            'description': 'English Subtittles',
 | 
			
		||||
            'thumbnail': 're:^https?://.*\.jpg',
 | 
			
		||||
            'duration': 81.3,
 | 
			
		||||
        },
 | 
			
		||||
        'params': {
 | 
			
		||||
            # m3u8 download
 | 
			
		||||
            'skip_download': True,
 | 
			
		||||
        },
 | 
			
		||||
    }, {
 | 
			
		||||
        # live stream
 | 
			
		||||
        'url': 'http://www.ceskatelevize.cz/ivysilani/zive/ct4/',
 | 
			
		||||
        'info_dict': {
 | 
			
		||||
            'id': 402,
 | 
			
		||||
            'ext': 'mp4',
 | 
			
		||||
            'title': 're:ČT Sport.*',
 | 
			
		||||
            'title': 're:^ČT Sport \d{4}-\d{2}-\d{2} \d{2}:\d{2}$',
 | 
			
		||||
            'is_live': True,
 | 
			
		||||
        },
 | 
			
		||||
        'params': {
 | 
			
		||||
            # m3u8 download
 | 
			
		||||
            'skip_download': True,
 | 
			
		||||
        },
 | 
			
		||||
        'skip': 'Georestricted to Czech Republic',
 | 
			
		||||
    }, {
 | 
			
		||||
        # video with 18+ caution trailer
 | 
			
		||||
        'url': 'http://www.ceskatelevize.cz/porady/10520528904-queer/215562210900007-bogotart/',
 | 
			
		||||
@@ -125,7 +140,7 @@ class CeskaTelevizeIE(InfoExtractor):
 | 
			
		||||
 | 
			
		||||
        entries = []
 | 
			
		||||
        for item in playlist:
 | 
			
		||||
            is_live = item['type'] == 'LIVE'
 | 
			
		||||
            is_live = item.get('type') == 'LIVE'
 | 
			
		||||
            formats = []
 | 
			
		||||
            for format_id, stream_url in item['streamUrls'].items():
 | 
			
		||||
                formats.extend(self._extract_m3u8_formats(
 | 
			
		||||
@@ -147,15 +162,9 @@ class CeskaTelevizeIE(InfoExtractor):
 | 
			
		||||
                    subtitles = self.extract_subtitles(episode_id, subs)
 | 
			
		||||
 | 
			
		||||
            if playlist_len == 1:
 | 
			
		||||
                final_title = playlist_title or title
 | 
			
		||||
                if is_live:
 | 
			
		||||
                    # live streams has channel name in title
 | 
			
		||||
                    final_title = self._live_title(title)
 | 
			
		||||
                elif playlist_title:
 | 
			
		||||
                    # title is always set (no KeyError caught)
 | 
			
		||||
                    # and gives good fallback
 | 
			
		||||
                    final_title = title
 | 
			
		||||
                else:
 | 
			
		||||
                    final_title = playlist_title
 | 
			
		||||
                    final_title = self._live_title(final_title)
 | 
			
		||||
            else:
 | 
			
		||||
                final_title = '%s (%s)' % (playlist_title, title)
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user