aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor/xstream.py
diff options
context:
space:
mode:
authorremitamine <remitamine@gmail.com>2015-12-10 22:18:42 +0100
committerremitamine <remitamine@gmail.com>2015-12-10 22:18:42 +0100
commitd50116b8ac2484ce9e8bc6a3d885c5a4a09b4e47 (patch)
treeed541b1dba81cc5b4774540c0757174f6741048b /youtube_dl/extractor/xstream.py
parent41c3b34b1f1f94c723f3af760ccddc4d7119464f (diff)
[vgtv] extract 5 digit length video ids using both xstream and vgtv
Diffstat (limited to 'youtube_dl/extractor/xstream.py')
-rw-r--r--youtube_dl/extractor/xstream.py14
1 files changed, 9 insertions, 5 deletions
diff --git a/youtube_dl/extractor/xstream.py b/youtube_dl/extractor/xstream.py
index 71584c291..436f8978b 100644
--- a/youtube_dl/extractor/xstream.py
+++ b/youtube_dl/extractor/xstream.py
@@ -42,11 +42,7 @@ class XstreamIE(InfoExtractor):
'only_matching': True,
}]
- def _real_extract(self, url):
- mobj = re.match(self._VALID_URL, url)
- partner_id = mobj.group('partner_id')
- video_id = mobj.group('id')
-
+ def _extract_video_info(self, partner_id, video_id):
data = self._download_xml(
'http://frontend.xstream.dk/%s/feed/video/?platform=web&id=%s'
% (partner_id, video_id),
@@ -97,6 +93,7 @@ class XstreamIE(InfoExtractor):
formats.append({
'url': link.get('href'),
'format_id': link.get('rel'),
+ 'preference': 2,
})
thumbnails = [{
@@ -113,3 +110,10 @@ class XstreamIE(InfoExtractor):
'formats': formats,
'thumbnails': thumbnails,
}
+
+ def _real_extract(self, url):
+ mobj = re.match(self._VALID_URL, url)
+ partner_id = mobj.group('partner_id')
+ video_id = mobj.group('id')
+
+ return self._extract_video_info(partner_id, video_id)