-
- def _check_data():
- for i in range(len(base64_fragments) + 1):
- for j in range(i, len(base64_fragments) + 1):
- data = _check_sequence(base64_fragments[:i] + base64_fragments[j:])
- if data:
- return data
-
- self.to_screen('Try to compute possible data sequence. This may take some time.')
- data = _check_data()
-
- if not data:
- raise ExtractorError(
- 'Preload information could not be extracted', expected=True)
-
- formats = []
- get_quality = qualities(['500k', '480p', '1000k', '720p', '1080p'])
- for filed in data['files']:
- if determine_ext(filed['url']) == 'm3u8':
- # compat_urllib_parse.urljoin does not work here
- if filed['url'].startswith('/'):
- m3u8_url = 'http://ht.cdn.turner.com/tbs/big/teamcoco' + filed['url']
- else:
- m3u8_url = filed['url']
- m3u8_formats = self._extract_m3u8_formats(
- m3u8_url, video_id, ext='mp4')
- for m3u8_format in m3u8_formats:
- if m3u8_format not in formats:
- formats.append(m3u8_format)
- elif determine_ext(filed['url']) == 'f4m':
- # TODO Correct f4m extraction
- continue
- else:
- if filed['url'].startswith('/mp4:protected/'):
- # TODO Correct extraction for these files