aboutsummaryrefslogtreecommitdiffstats
path: root/yt_dlp/extractor/cbc.py
diff options
context:
space:
mode:
authorpukkandan <pukkandan.ytdlp@gmail.com>2021-12-25 07:53:02 +0530
committerpukkandan <pukkandan.ytdlp@gmail.com>2021-12-25 07:53:38 +0530
commit332da56f52cd5faa57f654bdc8c926d10fbfda95 (patch)
treeb2ae2a2e1b24b003670eef05a3706ab060c3e359 /yt_dlp/extractor/cbc.py
parent459aea84c32b71590558813186be2e34edb0b86d (diff)
downloadhypervideo-pre-332da56f52cd5faa57f654bdc8c926d10fbfda95.tar.lz
hypervideo-pre-332da56f52cd5faa57f654bdc8c926d10fbfda95.tar.xz
hypervideo-pre-332da56f52cd5faa57f654bdc8c926d10fbfda95.zip
[CBC] Fix URL regex
Closes #2110
Diffstat (limited to 'yt_dlp/extractor/cbc.py')
-rw-r--r--yt_dlp/extractor/cbc.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/yt_dlp/extractor/cbc.py b/yt_dlp/extractor/cbc.py
index 33299e940..ac1272f7b 100644
--- a/yt_dlp/extractor/cbc.py
+++ b/yt_dlp/extractor/cbc.py
@@ -340,7 +340,8 @@ class CBCGemIE(InfoExtractor):
yield {
**base_format,
'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')),
'tbr': bitrate / 1000.0,
'height': height,