Skip to content

Commit

Permalink
[youtube] Improve extraction
Browse files Browse the repository at this point in the history
+ Add support for --no-playlist (closes ytdl-org#27009)
* Improve playlist and mix extraction (closes ytdl-org#26390, closes ytdl-org#26509, closes ytdl-org#26534, closes ytdl-org#27011)
+ Extract playlist uploader data
* Update tests
  • Loading branch information
dstftw committed Nov 17, 2020
1 parent 284f830 commit 2864179
Show file tree
Hide file tree
Showing 2 changed files with 142 additions and 96 deletions.
9 changes: 5 additions & 4 deletions test/test_all_urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,17 @@ def assertMatch(self, url, ie_list):

def test_youtube_playlist_matching(self):
assertPlaylist = lambda url: self.assertMatch(url, ['youtube:playlist'])
assertTab = lambda url: self.assertMatch(url, ['youtube:tab'])
assertPlaylist('ECUl4u3cNGP61MdtwGTqZA0MreSaDybji8')
assertPlaylist('UUBABnxM4Ar9ten8Mdjj1j0Q') # 585
assertPlaylist('PL63F0C78739B09958')
# assertPlaylist('https://www.youtube.com/playlist?list=UUBABnxM4Ar9ten8Mdjj1j0Q')
assertTab('https://www.youtube.com/playlist?list=UUBABnxM4Ar9ten8Mdjj1j0Q')
assertPlaylist('https://www.youtube.com/course?list=ECUl4u3cNGP61MdtwGTqZA0MreSaDybji8')
# assertPlaylist('https://www.youtube.com/playlist?list=PLwP_SiAcdui0KVebT0mU9Apz359a4ubsC')
assertPlaylist('https://www.youtube.com/watch?v=AV6J6_AeFEQ&playnext=1&list=PL4023E734DA416012') # 668
assertTab('https://www.youtube.com/playlist?list=PLwP_SiAcdui0KVebT0mU9Apz359a4ubsC')
assertTab('https://www.youtube.com/watch?v=AV6J6_AeFEQ&playnext=1&list=PL4023E734DA416012') # 668
self.assertFalse('youtube:playlist' in self.matching_ies('PLtS2H6bU1M'))
# Top tracks
# assertPlaylist('https://www.youtube.com/playlist?list=MCUS.20142101')
assertTab('https://www.youtube.com/playlist?list=MCUS.20142101')

def test_youtube_matching(self):
self.assertTrue(YoutubeIE.suitable('PLtS2H6bU1M'))
Expand Down
Loading

0 comments on commit 2864179

Please sign in to comment.