]>
Commit | Line | Data |
---|---|---|
edb7fc54 S |
1 | from __future__ import unicode_literals |
2 | ||
3d60d337 | 3 | from .common import InfoExtractor |
1cc79574 | 4 | from ..compat import compat_urlparse |
3d60d337 | 5 | from .internetvideoarchive import InternetVideoArchiveIE |
3d60d337 JMF |
6 | |
7 | ||
8 | class VideoDetectiveIE(InfoExtractor): | |
92519402 | 9 | _VALID_URL = r'https?://(?:www\.)?videodetective\.com/[^/]+/[^/]+/(?P<id>\d+)' |
3d60d337 JMF |
10 | |
11 | _TEST = { | |
edb7fc54 S |
12 | 'url': 'http://www.videodetective.com/movies/kick-ass-2/194487', |
13 | 'info_dict': { | |
14 | 'id': '194487', | |
15 | 'ext': 'mp4', | |
16 | 'title': 'KICK-ASS 2', | |
c9911067 YCH |
17 | 'description': 'md5:c189d5b7280400630a1d3dd17eaa8d8a', |
18 | }, | |
19 | 'params': { | |
20 | # m3u8 download | |
21 | 'skip_download': True, | |
3d60d337 JMF |
22 | }, |
23 | } | |
24 | ||
25 | def _real_extract(self, url): | |
1cc79574 | 26 | video_id = self._match_id(url) |
3d60d337 JMF |
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 | |
c9911067 | 30 | return self.url_result(InternetVideoArchiveIE._build_json_url(query), ie=InternetVideoArchiveIE.ie_key()) |