]> jfr.im git - yt-dlp.git/blobdiff - yt_dlp/extractor/cwtv.py
[ie/matchtv] Fix extractor (#10190)
[yt-dlp.git] / yt_dlp / extractor / cwtv.py
index 9b83264ee1617ee445e8f1381bec18d2e8207abf..870d4f39e31b24270002682bcaa55fba837f18d0 100644 (file)
@@ -46,6 +46,10 @@ class CWTVIE(InfoExtractor):
             'timestamp': 1444107300,
             'age_limit': 14,
             'uploader': 'CWTV',
+            'thumbnail': r're:^https?://.*\.jpe?g$',
+            'chapters': 'count:4',
+            'episode': 'Episode 20',
+            'season': 'Season 11',
         },
         'params': {
             # m3u8 download
@@ -71,7 +75,7 @@ def _real_extract(self, url):
             raise ExtractorError(data['msg'], expected=True)
         video_data = data['video']
         title = video_data['title']
-        mpx_url = video_data.get('mpx_url') or 'http://link.theplatform.com/s/cwtv/media/guid/2703454149/%s?formats=M3U' % video_id
+        mpx_url = video_data.get('mpx_url') or f'http://link.theplatform.com/s/cwtv/media/guid/2703454149/{video_id}?formats=M3U'
 
         season = str_or_none(video_data.get('season'))
         episode = str_or_none(video_data.get('episode'))
@@ -91,5 +95,5 @@ def _real_extract(self, url):
             'timestamp': parse_iso8601(video_data.get('start_time')),
             'age_limit': parse_age_limit(video_data.get('rating')),
             'ie_key': 'ThePlatform',
-            'thumbnail': video_data.get('large_thumbnail')
+            'thumbnail': video_data.get('large_thumbnail'),
         }