[ie/cwtv] Fix extraction (#11230)

Closes #9935
Authored by: bashonly
This commit is contained in:
bashonly 2024-10-12 17:47:37 +00:00 committed by GitHub
parent f433871424
commit 9d43dcb2c5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -6,6 +6,7 @@
parse_iso8601, parse_iso8601,
smuggle_url, smuggle_url,
str_or_none, str_or_none,
update_url_query,
) )
@ -98,7 +99,9 @@ def _real_extract(self, url):
raise ExtractorError(data['msg'], expected=True) raise ExtractorError(data['msg'], expected=True)
video_data = data['video'] video_data = data['video']
title = video_data['title'] title = video_data['title']
mpx_url = video_data.get('mpx_url') or f'https://link.theplatform.com/s/cwtv/media/guid/2703454149/{video_id}?formats=M3U' mpx_url = update_url_query(
video_data.get('mpx_url') or f'https://link.theplatform.com/s/cwtv/media/guid/2703454149/{video_id}',
{'formats': 'M3U+none'})
season = str_or_none(video_data.get('season')) season = str_or_none(video_data.get('season'))
episode = str_or_none(video_data.get('episode')) episode = str_or_none(video_data.get('episode'))