]>
Raphaƫl G. Git Repositories - youtubedl/blob - youtube_dl/extractor/videodetective.py
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())