1 from __future__ import unicode_literals
5 from .common import InfoExtractor
6 from .internetvideoarchive import InternetVideoArchiveIE
7 from ..utils import compat_urlparse
10 class VideoDetectiveIE(InfoExtractor):
11 _VALID_URL = r'https?://www\.videodetective\.com/[^/]+/[^/]+/(?P<id>\d+)'
14 'url': 'http://www.videodetective.com/movies/kick-ass-2/194487',
18 'title': 'KICK-ASS 2',
19 'description': 'md5:65ba37ad619165afac7d432eaded6013',
24 def _real_extract(self, url):
25 mobj = re.match(self._VALID_URL, url)
26 video_id = mobj.group('id')
27 webpage = self._download_webpage(url, video_id)
28 og_video = self._og_search_video_url(webpage)
29 query = compat_urlparse.urlparse(og_video).query
30 return self.url_result(InternetVideoArchiveIE._build_url(query), ie=InternetVideoArchiveIE.ie_key())