aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor/uplynk.py
diff options
context:
space:
mode:
authorRemita Amine <remitamine@gmail.com>2016-08-14 19:04:23 +0100
committerRemita Amine <remitamine@gmail.com>2016-08-14 19:04:23 +0100
commit9fa57892790ce205634f6a7c83de2b9e52ab5284 (patch)
treeff8a0b2e790faea2f6443ed307c54ab9cf08d485 /youtube_dl/extractor/uplynk.py
parentd2ac04674d0d9085aedec229820c1d07082e5825 (diff)
downloadyoutube-dl-9fa57892790ce205634f6a7c83de2b9e52ab5284.tar.xz
[viceland] fix info extraction(closes #8799)
Diffstat (limited to 'youtube_dl/extractor/uplynk.py')
-rw-r--r--youtube_dl/extractor/uplynk.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/youtube_dl/extractor/uplynk.py b/youtube_dl/extractor/uplynk.py
index a6a685c9d..4313bc9cb 100644
--- a/youtube_dl/extractor/uplynk.py
+++ b/youtube_dl/extractor/uplynk.py
@@ -26,8 +26,8 @@ class UplynkIE(InfoExtractor):
},
}
- def _real_extract(self, url):
- path, external_id, video_id, session_id = re.match(self._VALID_URL, url).groups()
+ def _extract_uplynk_info(self, uplynk_content_url):
+ path, external_id, video_id, session_id = re.match(UplynkIE._VALID_URL, uplynk_content_url).groups()
display_id = video_id or external_id
formats = self._extract_m3u8_formats('http://content.uplynk.com/%s.m3u8' % path, display_id, 'mp4')
if session_id:
@@ -49,8 +49,11 @@ class UplynkIE(InfoExtractor):
'formats': formats,
}
+ def _real_extract(self, url):
+ return self._extract_uplynk_info(url)
+
-class UplynkPreplayIE(InfoExtractor):
+class UplynkPreplayIE(UplynkIE):
_VALID_URL = r'https?://.*?\.uplynk\.com/preplay2?/(?P<path>ext/[0-9a-f]{32}/(?P<external_id>[^/?&]+)|(?P<id>[0-9a-f]{32}))\.json'
def _real_extract(self, url):
@@ -61,4 +64,4 @@ class UplynkPreplayIE(InfoExtractor):
session_id = preplay.get('sid')
if session_id:
content_url += '?pbs=' + session_id
- return self.url_result(content_url, 'Uplynk')
+ return self._extract_uplynk_info(content_url)