1 from __future__ import unicode_literals
5 from .common import InfoExtractor
8 class WayOfTheMasterIE(InfoExtractor):
9 _VALID_URL = r'https?://www\.wayofthemaster\.com/([^/?#]*/)*(?P<id>[^/?#]+)\.s?html(?:$|[?#])'
12 'url': 'http://www.wayofthemaster.com/hbks.shtml',
13 'md5': '5316b57487ada8480606a93cb3d18d24',
17 'title': 'Intelligent Design vs. Evolution',
21 def _real_extract(self, url):
22 mobj = re.match(self._VALID_URL, url)
23 video_id = mobj.group('id')
25 webpage = self._download_webpage(url, video_id)
27 title = self._search_regex(
28 r'<img src="images/title_[^"]+".*?alt="([^"]+)"',
29 webpage, 'title', default=None)
31 title = self._html_search_regex(
32 r'<title>(.*?)</title>', webpage, 'page title')
34 url_base = self._search_regex(
35 r'<param\s+name="?movie"?\s+value=".*?/wotm_videoplayer_highlow[0-9]*\.swf\?vid=([^"]+)"',
40 'url': url_base + '_low.mp4',
44 'url': url_base + '_high.mp4',
46 self._sort_formats(formats)