]>
Raphaƫl G. Git Repositories - youtubedl/blob - youtube_dl/extractor/wayofthemaster.py
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
)