my my let's try again.

This commit is contained in:
TheDaChicken 2018-09-04 19:24:34 -07:00 committed by GitHub
parent aa359943bb
commit dfd8f36472
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -28,24 +28,30 @@ class CartoonNetworkIE(TurnerBaseIE):
video_id = self._html_search_regex(r'[^>]+.mediaId = "(.+?)"', webpage, 'video_id') video_id = self._html_search_regex(r'[^>]+.mediaId = "(.+?)"', webpage, 'video_id')
title = self._html_search_regex(r'[^>]+.episodeTitle = "(.+?)"', webpage, 'title') title = self._html_search_regex(r'[^>]+.episodeTitle = "(.+?)"', webpage, 'title')
auth = self._html_search_regex(r'[^>]+.authType = "(.+?)"', webpage, 'authType') auth = self._html_search_regex(r'[^>]+.authType = "(.+?)"', webpage, 'authType')
if "unauth" in auth:
auth_required = ''
if "auth" in auth:
auth_required = 'true'
videoType = self._html_search_regex(r'[^>]+.videoType = "(.+?)"', webpage, 'videoType') videoType = self._html_search_regex(r'[^>]+.videoType = "(.+?)"', webpage, 'videoType')
if 'short' in videoType: if 'short' in videoType:
description = '' description = ''
else: else:
description = self._html_search_regex(r'id="[^>]+description[^>]*>(.+?)</div>', webpage, 'description') description = self._html_search_regex(r'id="[^>]+description[^>]*>(.+?)</div>', webpage, 'description')
info = self._extract_ngtv_info( if "auth" in auth:
video_id, info = self._extract_ngtv_info(
{'networkId': 'cartoonnetwork'}, video_id,
{ {'networkId': 'cartoonnetwork'},
{
'url': url, 'url': url,
'site_name': 'CartoonNetwork', 'site_name': 'CartoonNetwork',
'auth_required': auth_required, 'auth_required': 'true',
}, },
) )
if "unauth" in auth:
info = self._extract_ngtv_info(
video_id,
{'networkId': 'cartoonnetwork'},
{
'url': url,
'site_name': 'CartoonNetwork',
},
)
info.update({ info.update({
'id': video_id, 'id': video_id,
'title': title, 'title': title,