[CartoonNetwork] Cleaned up some of the code.

This commit is contained in:
TheDaChicken 2018-09-09 13:26:10 -07:00 committed by GitHub
parent ea41ca2336
commit f4dde36bf9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -32,12 +32,8 @@ class CartoonNetworkIE(TurnerBaseIE):
auth_required = 'true'
if "unauth" in auth:
auth_required = '' #Auth needs to be first due to Auth being in unauth. :/
#print(auth_required)
videoType = self._html_search_regex(r'[^>]+.videoType = "(.+?)"', webpage, 'videoType')
if 'short' in videoType:
description = ''
else:
description = self._html_search_regex(r'id="[^>]+description[^>]*>(.+?)</div>', webpage, 'description')
description = self._html_search_regex(r'id="[^>]+description[^>]*>(.+?)</div>', webpage, 'description', default=None)
info = self._extract_ngtv_info(
video_id,
{'networkId': 'cartoonnetwork'},