0
0
Fork 0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2024-11-27 03:03:01 +00:00

[youtube] fix show extraction (fixes #4841)

Closes #6782)
This commit is contained in:
remitamine 2015-09-07 07:47:55 +01:00 committed by Jaime Marquínez Ferrándiz
parent c67a055d16
commit 8801255d7d

View file

@ -1836,7 +1836,7 @@ class YoutubeShowIE(InfoExtractor):
IE_NAME = 'youtube:show' IE_NAME = 'youtube:show'
_TESTS = [{ _TESTS = [{
'url': 'http://www.youtube.com/show/airdisasters', 'url': 'http://www.youtube.com/show/airdisasters',
'playlist_mincount': 3, 'playlist_mincount': 5,
'info_dict': { 'info_dict': {
'id': 'airdisasters', 'id': 'airdisasters',
'title': 'Air Disasters', 'title': 'Air Disasters',
@ -1847,7 +1847,7 @@ def _real_extract(self, url):
mobj = re.match(self._VALID_URL, url) mobj = re.match(self._VALID_URL, url)
playlist_id = mobj.group('id') playlist_id = mobj.group('id')
webpage = self._download_webpage( webpage = self._download_webpage(
url, playlist_id, 'Downloading show webpage') 'http://www.youtube.com/show/%s/playlists' % playlist_id, playlist_id, 'Downloading show webpage')
# There's one playlist for each season of the show # There's one playlist for each season of the show
m_seasons = list(re.finditer(r'href="(/playlist\?list=.*?)"', webpage)) m_seasons = list(re.finditer(r'href="(/playlist\?list=.*?)"', webpage))
self.to_screen('%s: Found %s seasons' % (playlist_id, len(m_seasons))) self.to_screen('%s: Found %s seasons' % (playlist_id, len(m_seasons)))