[CartoonNetwork] Fixed shortclips

ShortClips don't have descriptions, so it will crash but now it's fixed.
This commit is contained in:
TheDaChicken 2018-08-27 16:03:37 -07:00 committed by GitHub
parent 80f77c3b59
commit ccc4c02ece
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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'<div id="cn-videopage-ep-description-copy" itemprop="description">(.+?)</div>', 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'<div id="cn-videopage-ep-description-copy" itemprop="description">(.+?)</div>', webpage, 'description')
info = self._extract_ngtv_info(
video_id,
{'networkId': 'cartoonnetwork'},