diff options
author | Yen Chi Hsuan <[email protected]> | 2015-05-19 00:45:01 +0800 |
---|---|---|
committer | Yen Chi Hsuan <[email protected]> | 2015-05-19 00:45:01 +0800 |
commit | 1b0427e6c433c0b6db5e210db6e3173e19e702ed (patch) | |
tree | f40cf7435bbae35bdb1419742d5149c03cf94b9d /test | |
parent | 2aa64b89b3ac8f387d4c0c27ce7de64bc0ff68de (diff) | |
download | youtube-dl-1b0427e6c433c0b6db5e210db6e3173e19e702ed.tar.gz youtube-dl-1b0427e6c433c0b6db5e210db6e3173e19e702ed.zip |
[utils] Support TTML without default namespace
In a strict sense such TTML is invalid, but Yahoo uses it.
Diffstat (limited to 'test')
-rw-r--r-- | test/test_utils.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/test_utils.py b/test/test_utils.py index b40107037..e13e11b59 100644 --- a/test/test_utils.py +++ b/test/test_utils.py @@ -621,6 +621,21 @@ Line ''' self.assertEqual(dfxp2srt(dfxp_data), srt_data) + dfxp_data_no_default_namespace = '''<?xml version="1.0" encoding="UTF-8"?> + <tt xml:lang="en" xmlns:tts="http://www.w3.org/ns/ttml#parameter"> + <body> + <div xml:lang="en"> + <p begin="0" end="1">The first line</p> + </div> + </body> + </tt>''' + srt_data = '''1 +00:00:00,000 --> 00:00:01,000 +The first line + +''' + self.assertEqual(dfxp2srt(dfxp_data_no_default_namespace), srt_data) + if __name__ == '__main__': unittest.main() |