From 3a169c8c0d35b52a21ec96714589cd9eee83418d Mon Sep 17 00:00:00 2001 From: Daniel Baerwalde <2660574+shirtjs@users.noreply.github.com> Date: Fri, 17 Aug 2018 12:39:44 -0400 Subject: [PATCH] Add support for disneynow.go.com --- youtube_dl/extractor/go.py | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/youtube_dl/extractor/go.py b/youtube_dl/extractor/go.py index e781405f2..7e9075f6a 100644 --- a/youtube_dl/extractor/go.py +++ b/youtube_dl/extractor/go.py @@ -34,6 +34,10 @@ class GoIE(AdobePassIE): 'watchdisneyxd': { 'brand': '009', 'requestor_id': 'DisneyXD', + }, + 'disneynow': { + 'brand': '010', + 'requestor_id': 'DisneyNow', } } _VALID_URL = r'https?://(?:(?P%s)\.)?go\.com/(?:(?:[^/]+/)*(?Pvdka\w+)|(?:[^/]+/)*(?P[^/?#]+))' % '|'.join(_SITE_INFO.keys()) @@ -92,7 +96,18 @@ class GoIE(AdobePassIE): video['url'], 'Go', video.get('id'), video.get('title'))) entries.reverse() return self.playlist_result(entries, show_id, show_title) - video_data = self._extract_videos(brand, video_id)[0] + if sub_domain == 'disneynow': + for sub_domain in ['watchdisneychannel', 'watchdisneyjunior', 'watchdisneyxd']: + site_info = self._SITE_INFO[sub_domain] + brand = site_info['brand'] + try: + video_data = self._extract_videos(brand, video_id)[0] + except IndexError: + continue + else: + break + else: + video_data = self._extract_videos(brand, video_id)[0] video_id = video_data['id'] title = video_data['title']