aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor/common.py
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2016-11-13 05:43:34 +0700
committerSergey M․ <dstftw@gmail.com>2016-11-13 05:43:34 +0700
commit4ea4c0bb2248b4de7efc152a4ee91d104ac79bc5 (patch)
treef0b8f396ba8fa1f4a0344c4bb354a39cd89e60b6 /youtube_dl/extractor/common.py
parent577281b0c6b2fc774e03abf3465d47d909ba31e5 (diff)
[extractor/common] Fix Bandwidth substitution in media template (closes #11175)
Diffstat (limited to 'youtube_dl/extractor/common.py')
-rw-r--r--youtube_dl/extractor/common.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/youtube_dl/extractor/common.py b/youtube_dl/extractor/common.py
index bc5d6a4c3..05c51fac9 100644
--- a/youtube_dl/extractor/common.py
+++ b/youtube_dl/extractor/common.py
@@ -1703,7 +1703,7 @@ class InfoExtractor(object):
representation_ms_info['fragments'] = [{
'url': media_template % {
'Number': segment_number,
- 'Bandwidth': representation_attrib.get('bandwidth'),
+ 'Bandwidth': int_or_none(representation_attrib.get('bandwidth')),
},
'duration': segment_duration,
} for segment_number in range(
@@ -1721,7 +1721,7 @@ class InfoExtractor(object):
def add_segment_url():
segment_url = media_template % {
'Time': segment_time,
- 'Bandwidth': representation_attrib.get('bandwidth'),
+ 'Bandwidth': int_or_none(representation_attrib.get('bandwidth')),
'Number': segment_number,
}
representation_ms_info['fragments'].append({