I think I got it now lol
This commit is contained in:
parent
dfd8f36472
commit
c17af25816
@ -28,30 +28,24 @@ 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 "auth" in auth:
|
||||||
|
auth_required = ''
|
||||||
|
if "unauth" in auth:
|
||||||
|
auth_required = 'true' #Auth needs to be first due to Auth being in unauth. :/
|
||||||
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')
|
||||||
if "auth" in auth:
|
info = self._extract_ngtv_info(
|
||||||
info = self._extract_ngtv_info(
|
video_id,
|
||||||
video_id,
|
{'networkId': 'cartoonnetwork'},
|
||||||
{'networkId': 'cartoonnetwork'},
|
{
|
||||||
{
|
|
||||||
'url': url,
|
'url': url,
|
||||||
'site_name': 'CartoonNetwork',
|
'site_name': 'CartoonNetwork',
|
||||||
'auth_required': 'true',
|
'auth_required': auth_required,
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
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,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user