]> Raphaël G. Git Repositories - youtubedl/blob - youtube_dl/extractor/vodplatform.py
debian/README.source: Update steps used to create new release.
[youtubedl] / youtube_dl / extractor / vodplatform.py
1 # coding: utf-8
2 from __future__ import unicode_literals
3
4 from .common import InfoExtractor
5 from ..utils import unescapeHTML
6
7
8 class VODPlatformIE(InfoExtractor):
9 _VALID_URL = r'https?://(?:www\.)?vod-platform\.net/[eE]mbed/(?P<id>[^/?#]+)'
10 _TEST = {
11 # from http://www.lbcgroup.tv/watch/chapter/29143/52844/%D8%A7%D9%84%D9%86%D8%B5%D8%B1%D8%A9-%D9%81%D9%8A-%D8%B6%D9%8A%D8%A7%D9%81%D8%A9-%D8%A7%D9%84%D9%80-cnn/ar
12 'url': 'http://vod-platform.net/embed/RufMcytHDolTH1MuKHY9Fw',
13 'md5': '1db2b7249ce383d6be96499006e951fc',
14 'info_dict': {
15 'id': 'RufMcytHDolTH1MuKHY9Fw',
16 'ext': 'mp4',
17 'title': 'LBCi News_ النصرة في ضيافة الـ "سي.أن.أن"',
18 }
19 }
20
21 def _real_extract(self, url):
22 video_id = self._match_id(url)
23 webpage = self._download_webpage(url, video_id)
24
25 title = unescapeHTML(self._og_search_title(webpage))
26 hidden_inputs = self._hidden_inputs(webpage)
27
28 formats = self._extract_wowza_formats(
29 hidden_inputs.get('HiddenmyhHlsLink') or hidden_inputs['HiddenmyDashLink'], video_id, skip_protocols=['f4m', 'smil'])
30 self._sort_formats(formats)
31
32 return {
33 'id': video_id,
34 'title': title,
35 'thumbnail': hidden_inputs.get('HiddenThumbnail') or self._og_search_thumbnail(webpage),
36 'formats': formats,
37 }