1 from __future__ import unicode_literals
5 from .common import InfoExtractor
6 from ..utils import determine_ext
9 class WayOfTheMasterIE(InfoExtractor):
10 _VALID_URL = r'https?://www\.wayofthemaster\.com/([^/?#]*/)*(?P<id>[^/?#]+)\.s?html(?:$|[?#])'
13 'url': 'http://www.wayofthemaster.com/hbks.shtml',
14 'md5': '5316b57487ada8480606a93cb3d18d24',
18 'title': 'Intelligent Design vs. Evolution',
22 def _real_extract(self, url):
23 mobj = re.match(self._VALID_URL, url)
24 video_id = mobj.group('id')
26 webpage = self._download_webpage(url, video_id)
28 title = self._search_regex(
29 r'<img src="images/title_[^"]+".*?alt="([^"]+)"',
30 webpage, 'title', default=None)
32 title = self._html_search_regex(
33 r'<title>(.*?)</title>', webpage, 'page title')
35 url_base = self._search_regex(
36 r'<param\s+name="?movie"?\s+value=".*?/wotm_videoplayer_highlow[0-9]*\.swf\?vid=([^"]+)"',
41 'url': url_base + '_low.mp4',
45 'url': url_base + '_high.mp4',
47 self._sort_formats(formats)