2 from __future__ import unicode_literals
6 from .common import InfoExtractor
8 class CrackedIE(InfoExtractor):
9 _VALID_URL = r'http?://.*?\.cracked\.com/video_+(?P<id>.*)_.*'
11 'url': 'http://www.cracked.com/video_18803_4-social-criticisms-hidden-in-sonic-hedgehog-games.html',
16 'title': "4 Social Criticisms Hidden in 'Sonic the Hedgehog' Games | Cracked.com",
24 def _real_extract(self, url):
25 mobj = re.match(self._VALID_URL, url)
26 video_id = mobj.group('id')
28 webpage = self._download_webpage(url, video_id)
29 title = self._search_regex(r'<title>(.*?)</title>',webpage,'title')
30 video_url = self._search_regex(r'var CK_vidSrc = "+(.*)"',webpage,'url')
31 width = self._search_regex(r'width="(.*?)"',webpage,'width')
32 height = re.findall(r'height="(.*?)"',webpage)[1]