diff options
author | Tom-Oliver Heidel <github@tom-oliver.eu> | 2020-11-05 17:25:27 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-05 17:25:27 +0100 |
commit | f406ab6a144d49f33e8346a78f992dec57636d99 (patch) | |
tree | 36a6204c43bff72feac9a81f3d23e949b1d338b9 | |
parent | 206de9b233cdc812dfcba5f28cb1e96ea8c861e4 (diff) | |
parent | 15f6397c197af9ad464b2c385e3c8d4192aadb07 (diff) | |
download | hypervideo-pre-f406ab6a144d49f33e8346a78f992dec57636d99.tar.lz hypervideo-pre-f406ab6a144d49f33e8346a78f992dec57636d99.tar.xz hypervideo-pre-f406ab6a144d49f33e8346a78f992dec57636d99.zip |
Merge pull request #112 from insaneracist/youtube-mix-fix
[youtube] fix: mix playlist title
-rw-r--r-- | youtube_dlc/extractor/youtube.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/youtube_dlc/extractor/youtube.py b/youtube_dlc/extractor/youtube.py index 2e70ad6fa..025ea5e57 100644 --- a/youtube_dlc/extractor/youtube.py +++ b/youtube_dlc/extractor/youtube.py @@ -2842,6 +2842,7 @@ class YoutubePlaylistIE(YoutubePlaylistBaseInfoExtractor): # The mixes are generated from a single video # the id of the playlist is just 'RD' + video_id ids = [] + yt_initial = None last_id = playlist_id[-11:] for n in itertools.count(1): url = 'https://www.youtube.com/watch?v=%s&list=%s' % (last_id, playlist_id) @@ -2875,6 +2876,9 @@ class YoutubePlaylistIE(YoutubePlaylistBaseInfoExtractor): or search_title('title')) title = clean_html(title_span) + if not title: + title = try_get(yt_initial, lambda x: x['contents']['twoColumnWatchNextResults']['playlist']['playlist']['title'], compat_str) + return self.playlist_result(url_results, playlist_id, title) def _extract_playlist(self, playlist_id): |