]>
Raphaƫl G. Git Repositories - youtubedl/blob - youtube_dl/extractor/keek.py
1 from __future__
import unicode_literals
5 from .common
import InfoExtractor
8 class KeekIE(InfoExtractor
):
9 _VALID_URL
= r
'https?://(?:www\.)?keek\.com/(?:!|\w+/keeks/)(?P<videoID>\w+)'
12 'url': 'https://www.keek.com/ytdl/keeks/NODfbab',
13 'file': 'NODfbab.mp4',
14 'md5': '9b0636f8c0f7614afa4ea5e4c6e57e83',
17 'title': 'test chars: "\'/\\\u00e4<>This is a test video for youtube-dl.For more information, contact phihag@phihag.de .',
21 def _real_extract(self
, url
):
22 m
= re
.match(self
._VALID
_URL
, url
)
23 video_id
= m
.group('videoID')
25 video_url
= 'http://cdn.keek.com/keek/video/%s' % video_id
26 thumbnail
= 'http://cdn.keek.com/keek/thumbnail/%s/w100/h75' % video_id
27 webpage
= self
._download
_webpage
(url
, video_id
)
29 uploader
= self
._html
_search
_regex
(
30 r
'<div class="user-name-and-bio">[\S\s]+?<h2>(?P<uploader>.+?)</h2>',
31 webpage
, 'uploader', fatal
=False)
37 'title': self
._og
_search
_title
(webpage
),
38 'thumbnail': thumbnail
,