]>
Raphaƫl G. Git Repositories - youtubedl/blob - youtube_dl/extractor/ku6.py
1 from __future__
import unicode_literals
5 from .common
import InfoExtractor
8 class Ku6IE(InfoExtractor
):
9 _VALID_URL
= r
'http://v\.ku6\.com/show/(?P<id>[a-zA-Z0-9\-\_]+)(?:\.)*html'
11 'url': 'http://v.ku6.com/show/JG-8yS14xzBr4bCn1pu0xw...html',
12 'md5': '01203549b9efbb45f4b87d55bdea1ed1',
14 'id': 'JG-8yS14xzBr4bCn1pu0xw',
16 'title': 'techniques test',
20 def _real_extract(self
, url
):
21 mobj
= re
.match(self
._VALID
_URL
, url
)
22 video_id
= mobj
.group('id')
24 webpage
= self
._download
_webpage
(url
, video_id
)
25 title
= self
._search
_regex
(r
'<h1 title=.*>(.*?)</h1>', webpage
, 'title')
26 dataUrl
= 'http://v.ku6.com/fetchVideo4Player/%s.html' % video_id
27 jsonData
= self
._download
_json
(dataUrl
, video_id
)
28 downloadUrl
= jsonData
['data']['f']