aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_InfoExtractor.py
diff options
context:
space:
mode:
authorRogério Brito <rbrito@ime.usp.br>2017-11-08 04:34:09 -0200
committerRogério Brito <rbrito@ime.usp.br>2017-11-08 04:34:09 -0200
commit421b7b220ea958384617bd7d339f188bf601280e (patch)
tree1a3e74a21c92254ae88d12661f61a05a39a108e0 /test/test_InfoExtractor.py
parentcb145f3364e1a9778509df08a6404bf697d67b90 (diff)
parent32ad8acade51269177cd01c5aa3c7169557eeac8 (diff)
downloadyoutube-dl-421b7b220ea958384617bd7d339f188bf601280e.zip
youtube-dl-421b7b220ea958384617bd7d339f188bf601280e.tar.gz
youtube-dl-421b7b220ea958384617bd7d339f188bf601280e.tar.bz2
Update upstream source from tag 'upstream/2017.11.06'
Update to upstream version '2017.11.06' with Debian dir 5931589e7c307c2de69c9e3c4a7d50442dd2bf0a
Diffstat (limited to 'test/test_InfoExtractor.py')
-rw-r--r--test/test_InfoExtractor.py26
1 files changed, 26 insertions, 0 deletions
diff --git a/test/test_InfoExtractor.py b/test/test_InfoExtractor.py
index f18a823..686c63e 100644
--- a/test/test_InfoExtractor.py
+++ b/test/test_InfoExtractor.py
@@ -574,6 +574,32 @@ jwplayer("mediaplayer").setup({"abouttext":"Visit Indie DB","aboutlink":"http:\/
self.ie._sort_formats(formats)
expect_value(self, formats, expected_formats, None)
+ def test_parse_f4m_formats(self):
+ _TEST_CASES = [
+ (
+ # https://github.com/rg3/youtube-dl/issues/14660
+ 'custom_base_url',
+ 'http://api.new.livestream.com/accounts/6115179/events/6764928/videos/144884262.f4m',
+ [{
+ 'manifest_url': 'http://api.new.livestream.com/accounts/6115179/events/6764928/videos/144884262.f4m',
+ 'ext': 'flv',
+ 'format_id': '2148',
+ 'protocol': 'f4m',
+ 'tbr': 2148,
+ 'width': 1280,
+ 'height': 720,
+ }]
+ ),
+ ]
+
+ for f4m_file, f4m_url, expected_formats in _TEST_CASES:
+ with io.open('./test/testdata/f4m/%s.f4m' % f4m_file,
+ mode='r', encoding='utf-8') as f:
+ formats = self.ie._parse_f4m_formats(
+ compat_etree_fromstring(f.read().encode('utf-8')),
+ f4m_url, None)
+ self.ie._sort_formats(formats)
+ expect_value(self, formats, expected_formats, None)
if __name__ == '__main__':
unittest.main()