1 from __future__ import unicode_literals
3 from .common import InfoExtractor
6 class TwentyThreeVideoIE(InfoExtractor):
8 _VALID_URL = r'https?://(?:www\.)?(?P<client>[\w-]+)\.23video\.com/v.ihtml/player.html.*photo_id=(?P<id>\d+)'
11 _URL_TEMPLATE = 'https://%s.23video.com/%s/%s/%s/%s/download-video.mp4'
21 'video_mobile_high': {
27 def _extract_formats(self, url, client_id):
28 client_name = self._search_regex(r'([a-z]+)\.23video\.com', url, 'client name')
29 video_id = self._search_regex(r'photo%5fid=([^?&]+)', url, 'video id')
30 token = self._search_regex(r'token=([^?&]+)', url, 'token')
33 for format_key in self._FORMATS.keys():
35 'url': self._URL_TEMPLATE % (client_name, client_id, video_id,
37 'width': self._FORMATS.get(format_key, {}).get('width'),
38 'height': self._FORMATS.get(format_key, {}).get('height'),
43 def _real_extract(self, url):
44 # TODO: Find out how to extract client_id
45 raise NotImplementedError('Not able to extract the `client_id`')