keek.py 943 B

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