2015-09-26 11:07:18 -07:00
|
|
|
# coding: utf-8
|
2014-01-28 09:47:31 -08:00
|
|
|
from __future__ import unicode_literals
|
|
|
|
|
2013-06-23 13:16:41 -07:00
|
|
|
from .common import InfoExtractor
|
|
|
|
|
|
|
|
|
|
|
|
class KeekIE(InfoExtractor):
|
2015-09-24 14:38:00 -07:00
|
|
|
_VALID_URL = r'https?://(?:www\.)?keek\.com/keek/(?P<id>\w+)'
|
2014-01-28 09:47:31 -08:00
|
|
|
IE_NAME = 'keek'
|
2013-06-27 11:46:46 -07:00
|
|
|
_TEST = {
|
2015-09-24 14:38:00 -07:00
|
|
|
'url': 'https://www.keek.com/keek/NODfbab',
|
|
|
|
'md5': '9b0636f8c0f7614afa4ea5e4c6e57e83',
|
2014-01-28 09:47:31 -08:00
|
|
|
'info_dict': {
|
2014-12-13 03:35:13 -08:00
|
|
|
'id': 'NODfbab',
|
|
|
|
'ext': 'mp4',
|
2015-09-27 12:14:14 -07:00
|
|
|
'title': 'md5:35d42050a3ece241d5ddd7fdcc6fd896',
|
2015-09-26 10:04:25 -07:00
|
|
|
'uploader': 'ytdl',
|
|
|
|
'uploader_id': 'eGT5bab',
|
2014-01-28 09:47:31 -08:00
|
|
|
},
|
2013-06-27 11:46:46 -07:00
|
|
|
}
|
2013-06-23 13:16:41 -07:00
|
|
|
|
|
|
|
def _real_extract(self, url):
|
2014-12-13 03:35:13 -08:00
|
|
|
video_id = self._match_id(url)
|
2013-06-23 13:16:41 -07:00
|
|
|
|
|
|
|
webpage = self._download_webpage(url, video_id)
|
|
|
|
|
2014-01-28 09:47:31 -08:00
|
|
|
return {
|
|
|
|
'id': video_id,
|
2015-09-24 14:38:00 -07:00
|
|
|
'url': self._og_search_video_url(webpage),
|
2014-01-28 09:47:31 -08:00
|
|
|
'ext': 'mp4',
|
2015-09-27 12:14:14 -07:00
|
|
|
'title': self._og_search_description(webpage),
|
2015-09-24 14:38:00 -07:00
|
|
|
'thumbnail': self._og_search_thumbnail(webpage),
|
2015-09-27 12:05:24 -07:00
|
|
|
'uploader': self._search_regex(r'data-username="([^"]+)"', webpage, 'uploader', fatal=False),
|
|
|
|
'uploader_id': self._search_regex(r'data-user-id="([^"]+)"', webpage, 'uploader id', fatal=False),
|
2013-06-23 13:16:41 -07:00
|
|
|
}
|