mirror of
https://codeberg.org/polarisfm/youtube-dl.git
synced 2024-12-25 01:01:39 +00:00
[youtube:playlist] Fix the extraction of the title for some mixes (#1844)
Like https://www.youtube.com/watch?v=g8jDB5xOiuE&list=RDIh2gxLqR7HM
This commit is contained in:
parent
4b19e38954
commit
76d1700b28
1 changed files with 3 additions and 1 deletions
|
@ -1547,7 +1547,9 @@ class YoutubePlaylistIE(YoutubeBaseInfoExtractor):
|
||||||
# the id of the playlist is just 'RD' + video_id
|
# the id of the playlist is just 'RD' + video_id
|
||||||
url = 'https://youtube.com/watch?v=%s&list=%s' % (playlist_id[2:], playlist_id)
|
url = 'https://youtube.com/watch?v=%s&list=%s' % (playlist_id[2:], playlist_id)
|
||||||
webpage = self._download_webpage(url, playlist_id, u'Downloading Youtube mix')
|
webpage = self._download_webpage(url, playlist_id, u'Downloading Youtube mix')
|
||||||
title = clean_html(get_element_by_attribute('class', 'title long-title', webpage))
|
title_span = (get_element_by_attribute('class', 'title long-title', webpage) or
|
||||||
|
get_element_by_attribute('class', 'title ', webpage))
|
||||||
|
title = clean_html(title_span)
|
||||||
video_re = r'data-index="\d+".*?href="/watch\?v=([0-9A-Za-z_-]{11})&[^"]*?list=%s' % re.escape(playlist_id)
|
video_re = r'data-index="\d+".*?href="/watch\?v=([0-9A-Za-z_-]{11})&[^"]*?list=%s' % re.escape(playlist_id)
|
||||||
ids = orderedSet(re.findall(video_re, webpage))
|
ids = orderedSet(re.findall(video_re, webpage))
|
||||||
url_results = self._ids_to_results(ids)
|
url_results = self._ids_to_results(ids)
|
||||||
|
|
Loading…
Reference in a new issue