4 from .common import InfoExtractor
7 class HotNewHipHopIE(InfoExtractor):
8 _VALID_URL = r'(http://www\.hotnewhiphop.com/.*\.(?P<id>.*)\.html)'
9 IE_NAME = u'HotNewHipHop'
11 def _real_extract(self, url):
12 m = re.match(self._VALID_URL, url)
13 video_id = m.group('id')
15 webpage_src = self._download_webpage(url, video_id)
19 video_url_base64 = self._search_regex(r'data-path="(.*?)"',
20 webpage_src, u'video URL')
22 video_url = base64.b64decode(video_url_base64)
24 video_title = self._html_search_regex(r"<title>(.*)</title>",
25 webpage_src, u'title')
28 # Getting thumbnail and if not thumbnail sets correct title for WSHH candy video.
29 thumbnail = self._html_search_regex(r'"og:image" content="(.*)"',
30 webpage_src, u'thumbnail', fatal=False)
35 'title' : video_title,
36 'thumbnail' : thumbnail,