from __future__ import unicode_literals import re from .common import InfoExtractor class WayOfTheMasterIE(InfoExtractor): _VALID_URL = r'https?://www\.wayofthemaster\.com/([^/?#]*/)*(?P[^/?#]+)\.s?html(?:$|[?#])' _TEST = { 'url': 'http://www.wayofthemaster.com/hbks.shtml', 'md5': '5316b57487ada8480606a93cb3d18d24', 'info_dict': { 'id': 'hbks', 'ext': 'mp4', 'title': 'Intelligent Design vs. Evolution', }, } def _real_extract(self, url): mobj = re.match(self._VALID_URL, url) video_id = mobj.group('id') webpage = self._download_webpage(url, video_id) title = self._search_regex( r'(.*?)', webpage, 'page title') url_base = self._search_regex( r'