[keek] fix info extraction
[youtube-dl] / youtube_dl / extractor / keek.py
1 from __future__ import unicode_literals
2
3 from .common import InfoExtractor
4
5
6 class KeekIE(InfoExtractor):
7     _VALID_URL = r'https?://(?:www\.)?keek\.com/keek/(?P<id>\w+)'
8     IE_NAME = 'keek'
9     _TEST = {
10         'url': 'https://www.keek.com/keek/NODfbab',
11         'md5': '9b0636f8c0f7614afa4ea5e4c6e57e83',
12         'info_dict': {
13             'id': 'NODfbab',
14             'ext': 'mp4',
15             'title': 'test chars: "\'/\\รค<>This is a test video for youtube-dl.For more information, contact phihag@phihag.de . - Video - Videos on Keek',
16         },
17     }
18
19     def _real_extract(self, url):
20         video_id = self._match_id(url)
21
22         webpage = self._download_webpage(url, video_id)
23
24         return {
25             'id': video_id,
26             'url': self._og_search_video_url(webpage),
27             'ext': 'mp4',
28             'title': self._og_search_title(webpage),
29             'thumbnail': self._og_search_thumbnail(webpage),
30         }