3 from .common import InfoExtractor
10 class NormalbootsIE(InfoExtractor):
11 _VALID_URL = r'(?:http://)?(?:www\.)?normalboots\.com/video/(?P<videoid>[0-9a-z-]*)/?$'
13 def _real_extract(self, url):
14 mobj = re.match(self._VALID_URL, url)
16 raise ExtractorError(u'Invalid URL: %s' % url)
17 video_id = mobj.group('videoid')
28 webpage = self._download_webpage(url, video_id)
29 video_title = self._og_search_title(webpage)
30 video_description = self._og_search_description(webpage)
31 video_thumbnail = self._og_search_thumbnail(webpage)
32 video_uploader = self._html_search_regex(r'Posted\sby\s<a\shref="[A-Za-z0-9/]*">(?P<uploader>[A-Za-z]*)\s</a>',
34 raw_upload_date = self._html_search_regex('<span style="text-transform:uppercase; font-size:inherit;">[A-Za-z]+, (?P<date>.*)</span>',
36 video_upload_date = unified_strdate(raw_upload_date)
37 video_upload_date = unified_strdate(raw_upload_date)
39 player_url = self._html_search_regex(r'<iframe\swidth="[0-9]+"\sheight="[0-9]+"\ssrc="(?P<url>[\S]+)"', webpage, 'url')
40 player_page = self._download_webpage(player_url, video_id)
41 video_url = u'http://player.screenwavemedia.com/' + self._html_search_regex(r"'file':\s'(?P<file>[0-9A-Za-z-_\.]+)'", player_page, 'file')
43 info['url'] = video_url
44 info['title'] = video_title
45 info['description'] = video_description
46 info['thumbnail'] = video_thumbnail
47 info['uploader'] = video_uploader
48 info['upload_date'] = video_upload_date