aboutsummaryrefslogtreecommitdiff
path: root/test/test_youtube_lists.py
diff options
context:
space:
mode:
authorJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>2013-11-30 14:56:51 +0100
committerJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>2013-11-30 14:56:51 +0100
commit0a688bc0b28c970e9af965b3fa0c7927507eeb97 (patch)
treec4f6db17e33552a5dd58699ebe0e73bfaa284bb8 /test/test_youtube_lists.py
parentb138de72f2f0fc197fe46154bcaeceddb5713e7f (diff)
downloadyoutube-dl-0a688bc0b28c970e9af965b3fa0c7927507eeb97.tar.xz
[youtube] Add support for downloading top lists (fixes #1868)
It needs to know the channel and the title of the list, because the ids change every time you browse the channels and are attached to a 'VISITOR_INFO1_LIVE' cookie.
Diffstat (limited to 'test/test_youtube_lists.py')
-rw-r--r--test/test_youtube_lists.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/test_youtube_lists.py b/test/test_youtube_lists.py
index 95f07d129..33db09f43 100644
--- a/test/test_youtube_lists.py
+++ b/test/test_youtube_lists.py
@@ -15,6 +15,7 @@ from youtube_dl.extractor import (
YoutubeIE,
YoutubeChannelIE,
YoutubeShowIE,
+ YoutubeTopListIE,
)
@@ -116,5 +117,12 @@ class TestYoutubeLists(unittest.TestCase):
original_video = entries[0]
self.assertEqual(original_video['id'], 'rjFaenf1T-Y')
+ def test_youtube_toplist(self):
+ dl = FakeYDL()
+ ie = YoutubeTopListIE(dl)
+ result = ie.extract('yttoplist:music:Top Tracks')
+ entries = result['entries']
+ self.assertTrue(len(entries) >= 9)
+
if __name__ == '__main__':
unittest.main()