diff options
author | TRox1972 <TRox1972@users.noreply.github.com> | 2016-05-27 13:37:40 +0200 |
---|---|---|
committer | Sergey M․ <dstftw@gmail.com> | 2016-06-09 21:27:27 +0700 |
commit | bb1e44cc8ee7937422fb5635f3431feb6d5fd918 (patch) | |
tree | 138015b2a39ebede14f45a4457439787a091f3c0 /youtube_dl/extractor/godtv.py | |
parent | 21efee5f8bc8daf0cbb5fc3408a1fc5b9d5eadcb (diff) |
[godtv] Add extractor
[GodTV] Improvements
Diffstat (limited to 'youtube_dl/extractor/godtv.py')
-rw-r--r-- | youtube_dl/extractor/godtv.py | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/youtube_dl/extractor/godtv.py b/youtube_dl/extractor/godtv.py new file mode 100644 index 000000000..50f093ace --- /dev/null +++ b/youtube_dl/extractor/godtv.py @@ -0,0 +1,29 @@ +# coding: utf-8 +from __future__ import unicode_literals + +from .common import InfoExtractor +from .ooyala import OoyalaIE + + +class GodTVIE(InfoExtractor): + _VALID_URL = r'https?://(?:www\.)?god\.tv(?:/[^/]+)+/(?P<id>[^/?#&]+)' + _TEST = { + 'url': 'http://god.tv/jesus-image/video/jesus-conference-2016/randy-needham', + 'info_dict': { + 'id': 'lpd3g2MzE6D1g8zFAKz8AGpxWcpu6o_3', + 'ext': 'mp4', + 'title': 'Randy Needham', + 'duration': 3615.08, + }, + 'params': { + 'skip_download': True, + } + } + + def _real_extract(self, url): + display_id = self._match_id(url) + + webpage = self._download_webpage(url, display_id) + ooyala_id = self._search_regex(r'"content_id"\s*:\s*"([\w-]{32})"', webpage, display_id) + + return OoyalaIE._build_url_result(ooyala_id) |