]>
Raphaƫl G. Git Repositories - youtubedl/blob - youtube_dl/extractor/ku6.py
1 from __future__
import unicode_literals
3 from .common
import InfoExtractor
6 class Ku6IE(InfoExtractor
):
7 _VALID_URL
= r
'https?://v\.ku6\.com/show/(?P<id>[a-zA-Z0-9\-\_]+)(?:\.)*html'
9 'url': 'http://v.ku6.com/show/JG-8yS14xzBr4bCn1pu0xw...html',
10 'md5': '01203549b9efbb45f4b87d55bdea1ed1',
12 'id': 'JG-8yS14xzBr4bCn1pu0xw',
14 'title': 'techniques test',
18 def _real_extract(self
, url
):
19 video_id
= self
._match
_id
(url
)
20 webpage
= self
._download
_webpage
(url
, video_id
)
22 title
= self
._html
_search
_regex
(
23 r
'<h1 title=.*>(.*?)</h1>', webpage
, 'title')
24 dataUrl
= 'http://v.ku6.com/fetchVideo4Player/%s.html' % video_id
25 jsonData
= self
._download
_json
(dataUrl
, video_id
)
26 downloadUrl
= jsonData
['data']['f']