diff options
author | Sergey M․ <[email protected]> | 2017-07-21 00:13:32 +0700 |
---|---|---|
committer | Sergey M․ <[email protected]> | 2017-07-21 00:13:32 +0700 |
commit | 0396806f671e5828c2abdeb8048acf8b654507b6 (patch) | |
tree | 6ff8e94e78c9a1138474d9c1fcf99c39c2023dcf /test | |
parent | dc6520aa3d1fe7afc52613e392f15dde90af4844 (diff) | |
download | youtube-dl-0396806f671e5828c2abdeb8048acf8b654507b6.tar.gz youtube-dl-0396806f671e5828c2abdeb8048acf8b654507b6.zip |
[YoutubeDL] Do not override id, extractor and extractor_key in url_transparent
All these meta fields must be borrowed from final extractor that actually performs extraction.
This commit fixes extractor id in download archives for url_transparent downloads. Previously, 'transparent' extractor was erroneously
used for extractor archive id, e.g. 'eggheadlesson 4n8ugwwj5t' instead of 'wistia 4n8ugwwj5t'.
Diffstat (limited to 'test')
-rw-r--r-- | test/test_YoutubeDL.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/test/test_YoutubeDL.py b/test/test_YoutubeDL.py index 70989e232..e0decb81c 100644 --- a/test/test_YoutubeDL.py +++ b/test/test_YoutubeDL.py @@ -41,6 +41,7 @@ def _make_result(formats, **kwargs): 'id': 'testid', 'title': 'testttitle', 'extractor': 'testex', + 'extractor_key': 'TestEx', } res.update(**kwargs) return res @@ -761,7 +762,8 @@ class TestYoutubeDL(unittest.TestCase): '_type': 'url_transparent', 'url': 'foo2:', 'ie_key': 'Foo2', - 'title': 'foo1 title' + 'title': 'foo1 title', + 'id': 'foo1_id', } class Foo2IE(InfoExtractor): @@ -787,6 +789,9 @@ class TestYoutubeDL(unittest.TestCase): downloaded = ydl.downloaded_info_dicts[0] self.assertEqual(downloaded['url'], TEST_URL) self.assertEqual(downloaded['title'], 'foo1 title') + self.assertEqual(downloaded['id'], 'testid') + self.assertEqual(downloaded['extractor'], 'testex') + self.assertEqual(downloaded['extractor_key'], 'TestEx') if __name__ == '__main__': |