From ccc4c02ece13e616c5b317d5b70594d0eba5266a Mon Sep 17 00:00:00 2001 From: TheDaChicken Date: Mon, 27 Aug 2018 16:03:37 -0700 Subject: [PATCH] [CartoonNetwork] Fixed shortclips ShortClips don't have descriptions, so it will crash but now it's fixed. --- youtube_dl/extractor/cartoonnetwork.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/youtube_dl/extractor/cartoonnetwork.py b/youtube_dl/extractor/cartoonnetwork.py index 810eff47a..f267a15da 100644 --- a/youtube_dl/extractor/cartoonnetwork.py +++ b/youtube_dl/extractor/cartoonnetwork.py @@ -26,7 +26,11 @@ class CartoonNetworkIE(TurnerBaseIE): video_id = self._html_search_regex(r'_cnglobal.currentVideo.mediaId = "(.+?)"', webpage, 'video_id') title = self._html_search_regex(r'_cnglobal.currentVideo.episodeTitle = "(.+?)"', webpage, 'title') auth_required = self._html_search_regex(r'_cnglobal.currentVideo.authType = "(.+?)"', webpage, 'authType') - description = self._html_search_regex(r'
(.+?)
', webpage, 'description') + videoType = self._html_search_regex(r'_cnglobal.currentVideo.videoType = "(.+?)"', webpage, 'videoType') + if 'short' in videoType: + description = '' + else: + description = self._html_search_regex(r'
(.+?)
', webpage, 'description') info = self._extract_ngtv_info( video_id, {'networkId': 'cartoonnetwork'},