aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor/common.py
diff options
context:
space:
mode:
authorYen Chi Hsuan <yan12125@gmail.com>2015-07-17 12:02:49 +0800
committerYen Chi Hsuan <yan12125@gmail.com>2015-07-17 12:02:49 +0800
commita38436e8898b6eca29d9279346e6e2136ec0bc8f (patch)
treeca61a1188bb92ba356e809b661943aa87306ef77 /youtube_dl/extractor/common.py
parent23fc384f2c3cf9afd41fd7e033fe0823d0fc5fa5 (diff)
[extractor/common] Add 'transform_source' parameter to _extract_f4m_formats()
Diffstat (limited to 'youtube_dl/extractor/common.py')
-rw-r--r--youtube_dl/extractor/common.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/youtube_dl/extractor/common.py b/youtube_dl/extractor/common.py
index 271bf8596..5a2d0d995 100644
--- a/youtube_dl/extractor/common.py
+++ b/youtube_dl/extractor/common.py
@@ -836,13 +836,14 @@ class InfoExtractor(object):
self.to_screen(msg)
time.sleep(timeout)
- def _extract_f4m_formats(self, manifest_url, video_id, preference=None, f4m_id=None):
+ def _extract_f4m_formats(self, manifest_url, video_id, preference=None, f4m_id=None,
+ transform_source=lambda s: fix_xml_ampersands(s).strip()):
manifest = self._download_xml(
manifest_url, video_id, 'Downloading f4m manifest',
'Unable to download f4m manifest',
# Some manifests may be malformed, e.g. prosiebensat1 generated manifests
# (see https://github.com/rg3/youtube-dl/issues/6215#issuecomment-121704244)
- transform_source=lambda s: fix_xml_ampersands(s).strip())
+ transform_source=transform_source)
formats = []
manifest_version = '1.0'