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