]> jfr.im git - yt-dlp.git/blame - youtube_dl/extractor/godtv.py
[godtv] Add extractor
[yt-dlp.git] / youtube_dl / extractor / godtv.py
CommitLineData
bb1e44cc
T
1# coding: utf-8
2from __future__ import unicode_literals
3
4from .common import InfoExtractor
5from .ooyala import OoyalaIE
6
7
8class GodTVIE(InfoExtractor):
9 _VALID_URL = r'https?://(?:www\.)?god\.tv(?:/[^/]+)+/(?P<id>[^/?#&]+)'
10 _TEST = {
11 'url': 'http://god.tv/jesus-image/video/jesus-conference-2016/randy-needham',
12 'info_dict': {
13 'id': 'lpd3g2MzE6D1g8zFAKz8AGpxWcpu6o_3',
14 'ext': 'mp4',
15 'title': 'Randy Needham',
16 'duration': 3615.08,
17 },
18 'params': {
19 'skip_download': True,
20 }
21 }
22
23 def _real_extract(self, url):
24 display_id = self._match_id(url)
25
26 webpage = self._download_webpage(url, display_id)
27 ooyala_id = self._search_regex(r'"content_id"\s*:\s*"([\w-]{32})"', webpage, display_id)
28
29 return OoyalaIE._build_url_result(ooyala_id)