diff options
author | Jaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com> | 2013-12-23 16:41:35 +0100 |
---|---|---|
committer | Jaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com> | 2014-02-08 22:30:00 +0100 |
commit | a97bcd80bac769707b7a9138418794aaf883b34d (patch) | |
tree | 68dd70ba3aae52feae632dc470688ff40c4c8c97 /youtube_dl/extractor/syfy.py | |
parent | 17968e444cad4f960e5613441fdd266c04e71934 (diff) |
Add an extractor for syfy.com
It uses theplatfrom.com, which has been updated to work with f4m manifests
Diffstat (limited to 'youtube_dl/extractor/syfy.py')
-rw-r--r-- | youtube_dl/extractor/syfy.py | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/youtube_dl/extractor/syfy.py b/youtube_dl/extractor/syfy.py new file mode 100644 index 000000000..502d43ec4 --- /dev/null +++ b/youtube_dl/extractor/syfy.py @@ -0,0 +1,30 @@ +from __future__ import unicode_literals + +import re + +from .common import InfoExtractor + + +class SyfyIE(InfoExtractor): + _VALID_URL = r'https?://www\.syfy\.com/videos/.+?vid:(?P<id>\d+)' + + _TEST = { + 'url': 'http://www.syfy.com/videos/Robot%20Combat%20League/Behind%20the%20Scenes/vid:2631458', + 'info_dict': { + 'id': 'NmqMrGnXvmO1', + 'ext': 'flv', + 'title': 'George Lucas has Advice for his Daughter', + 'description': 'Listen to what insights George Lucas give his daughter Amanda.', + }, + 'params': { + # f4m download + 'skip_download': True, + }, + 'add_ie': ['ThePlatform'], + } + + def _real_extract(self, url): + mobj = re.match(self._VALID_URL, url) + video_id = mobj.group('id') + webpage = self._download_webpage(url, video_id) + return self.url_result(self._og_search_video_url(webpage)) |