]>
Raphaƫl G. Git Repositories - youtubedl/blob - youtube_dl/extractor/videodetective.py
265dd5b91fd9e5c4fc5a0cac8a9f36dd36731cfe
3 from .common
import InfoExtractor
4 from .internetvideoarchive
import InternetVideoArchiveIE
10 class VideoDetectiveIE(InfoExtractor
):
11 _VALID_URL
= r
'https?://www\.videodetective\.com/[^/]+/[^/]+/(?P<id>\d+)'
14 u
'url': u
'http://www.videodetective.com/movies/kick-ass-2/194487',
15 u
'file': u
'194487.mp4',
17 u
'title': u
'KICK-ASS 2',
18 u
'description': u
'md5:65ba37ad619165afac7d432eaded6013',
23 def _real_extract(self
, url
):
24 mobj
= re
.match(self
._VALID
_URL
, url
)
25 video_id
= mobj
.group('id')
26 webpage
= self
._download
_webpage
(url
, video_id
)
27 og_video
= self
._og
_search
_video
_url
(webpage
)
28 query
= compat_urlparse
.urlparse(og_video
).query
29 return self
.url_result(InternetVideoArchiveIE
._build
_url
(query
),
30 ie
=InternetVideoArchiveIE
.ie_key())