0
0
Fork 0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2024-11-23 02:25:11 +00:00

[CBC] Fix URL regex

Closes #2110
This commit is contained in:
pukkandan 2021-12-25 07:53:02 +05:30
parent 459aea84c3
commit 332da56f52
No known key found for this signature in database
GPG key ID: 0F00D95A001F4698

View file

@ -340,7 +340,8 @@ def _find_secret_formats(self, formats, video_id):
yield { yield {
**base_format, **base_format,
'format_id': join_nonempty('sec', height), 'format_id': join_nonempty('sec', height),
'url': re.sub(r'(QualityLevels\()\d+(\))', fr'\1{bitrate}\2', base_url), # Note: \g<1> is necessary instead of \1 since bitrate is a number
'url': re.sub(r'(QualityLevels\()\d+(\))', fr'\g<1>{bitrate}\2', base_url),
'width': int_or_none(video_quality.attrib.get('MaxWidth')), 'width': int_or_none(video_quality.attrib.get('MaxWidth')),
'tbr': bitrate / 1000.0, 'tbr': bitrate / 1000.0,
'height': height, 'height': height,