aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor/trutv.py
diff options
context:
space:
mode:
authorRemita Amine <remitamine@gmail.com>2016-09-20 11:55:30 +0100
committerRemita Amine <remitamine@gmail.com>2016-09-20 11:55:30 +0100
commitc38f06818df83f5f46cbdee1069bfaf53a537cc8 (patch)
tree5e81f9594ea7d6f888e54788e1f37a14d54a3247 /youtube_dl/extractor/trutv.py
parentcb57386873a053b3328a78f48cf27f23ca6897d1 (diff)
add support for Adobe Pass auth in tbs,tnt and trutv extractors(fixes #10642)(closes #10222)(closes #10519)
Diffstat (limited to 'youtube_dl/extractor/trutv.py')
-rw-r--r--youtube_dl/extractor/trutv.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/youtube_dl/extractor/trutv.py b/youtube_dl/extractor/trutv.py
index e60d8a181..3a5782525 100644
--- a/youtube_dl/extractor/trutv.py
+++ b/youtube_dl/extractor/trutv.py
@@ -22,9 +22,17 @@ class TruTVIE(TurnerBaseIE):
def _real_extract(self, url):
path, video_id = re.match(self._VALID_URL, url).groups()
+ auth_required = False
if path:
data_src = 'http://www.trutv.com/video/cvp/v2/xml/content.xml?id=%s.xml' % path
else:
+ webpage = self._download_webpage(url, video_id)
+ video_id = self._search_regex(
+ r"TTV\.TVE\.episodeId\s*=\s*'([^']+)';",
+ webpage, 'video id', default=video_id)
+ auth_required = self._search_regex(
+ r'TTV\.TVE\.authRequired\s*=\s*(true|false);',
+ webpage, 'auth required', default='false') == 'true'
data_src = 'http://www.trutv.com/tveverywhere/services/cvpXML.do?titleId=' + video_id
return self._extract_cvp_info(
data_src, path, {
@@ -32,4 +40,8 @@ class TruTVIE(TurnerBaseIE):
'media_src': 'http://androidhls-secure.cdn.turner.com/trutv/big',
'tokenizer_src': 'http://www.trutv.com/tveverywhere/processors/services/token_ipadAdobe.do',
},
+ }, {
+ 'url': url,
+ 'site_name': 'truTV',
+ 'auth_required': auth_required,
})