]> jfr.im git - yt-dlp.git/blob - youtube_dl/extractor/syfy.py
Merge remote-tracking branch 'jaimeMF/f4m'
[yt-dlp.git] / youtube_dl / extractor / syfy.py
1 from __future__ import unicode_literals
2
3 import re
4
5 from .common import InfoExtractor
6
7
8 class SyfyIE(InfoExtractor):
9 _VALID_URL = r'https?://www\.syfy\.com/videos/.+?vid:(?P<id>\d+)'
10
11 _TEST = {
12 'url': 'http://www.syfy.com/videos/Robot%20Combat%20League/Behind%20the%20Scenes/vid:2631458',
13 'info_dict': {
14 'id': 'NmqMrGnXvmO1',
15 'ext': 'flv',
16 'title': 'George Lucas has Advice for his Daughter',
17 'description': 'Listen to what insights George Lucas give his daughter Amanda.',
18 },
19 'params': {
20 # f4m download
21 'skip_download': True,
22 },
23 'add_ie': ['ThePlatform'],
24 }
25
26 def _real_extract(self, url):
27 mobj = re.match(self._VALID_URL, url)
28 video_id = mobj.group('id')
29 webpage = self._download_webpage(url, video_id)
30 return self.url_result(self._og_search_video_url(webpage))