diff options
author | Sergey M․ <[email protected]> | 2020-12-09 00:05:21 +0700 |
---|---|---|
committer | Sergey M․ <[email protected]> | 2020-12-09 00:05:21 +0700 |
commit | 5a1fbbf8b7215aab0e6382e93eaa1561093352cf (patch) | |
tree | cf405ecd230d2259465ed2d65be86190b1d6ef3f /test | |
parent | e2bdf8bf4f3de7698d1d2844687e3acc760b34e7 (diff) | |
download | youtube-dl-5a1fbbf8b7215aab0e6382e93eaa1561093352cf.tar.gz youtube-dl-5a1fbbf8b7215aab0e6382e93eaa1561093352cf.zip |
[extractor/common] Fix inline HTML5 media tags processing and add test (closes #27345)
Diffstat (limited to 'test')
-rw-r--r-- | test/test_InfoExtractor.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/test_InfoExtractor.py b/test/test_InfoExtractor.py index 71f6608fe..644b3759c 100644 --- a/test/test_InfoExtractor.py +++ b/test/test_InfoExtractor.py @@ -108,6 +108,18 @@ class TestInfoExtractor(unittest.TestCase): self.assertEqual(self.ie._download_json(uri, None, fatal=False), None) def test_parse_html5_media_entries(self): + # inline video tag + expect_dict( + self, + self.ie._parse_html5_media_entries( + 'https://127.0.0.1/video.html', + r'<html><video src="/vid.mp4" /></html>', None)[0], + { + 'formats': [{ + 'url': 'https://127.0.0.1/vid.mp4', + }], + }) + # from https://www.r18.com/ # with kpbs in label expect_dict( |