mirror of
				https://github.com/ytdl-org/youtube-dl.git
				synced 2025-10-29 09:26:20 -07:00 
			
		
		
		
	[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.
This commit is contained in:
		| @@ -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() | ||||
|   | ||||
		Reference in New Issue
	
	Block a user