From 642484bbb228cbbf0030dc93646dc92ae25d5fb4 Mon Sep 17 00:00:00 2001 From: James Taylor Date: Mon, 29 Jul 2019 17:05:04 -0700 Subject: Fix broken video titles due to youtube changes --- youtube_dl/extractor/youtube.py | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) (limited to 'youtube_dl/extractor/youtube.py') diff --git a/youtube_dl/extractor/youtube.py b/youtube_dl/extractor/youtube.py index 360a0d4..18b240a 100644 --- a/youtube_dl/extractor/youtube.py +++ b/youtube_dl/extractor/youtube.py @@ -1874,12 +1874,8 @@ class YoutubeIE(YoutubeBaseInfoExtractor): video_details = try_get( player_response, lambda x: x['videoDetails'], dict) or {} - # title - if 'title' in video_info: - video_title = video_info['title'][0] - elif 'title' in player_response: - video_title = video_details['title'] - else: + video_title = video_info.get('title', [None])[0] or video_details.get('title') + if not video_title: self._downloader.report_warning('Unable to extract video title') video_title = '_' @@ -1908,11 +1904,7 @@ class YoutubeIE(YoutubeBaseInfoExtractor): ''', replace_url, video_description) video_description = clean_html(video_description) else: - fd_mobj = re.search(r'