from ..utils import (
ExtractorError,
int_or_none,
+ join_nonempty,
try_get,
url_or_none,
urlencode_postdata,
watch_url = url_or_none(watch.get('url'))
if not watch_url:
continue
- format_id_list = [stream_type]
- maxrate = watch.get('maxrate')
- if maxrate:
- format_id_list.append(compat_str(maxrate))
audio_channel = watch.get('audio_channel')
- if audio_channel:
- format_id_list.append(compat_str(audio_channel))
preference = 1 if audio_channel == 'A' else None
- format_id = '-'.join(format_id_list)
+ format_id = join_nonempty(stream_type, watch.get('maxrate'), audio_channel)
if stream_type in ('dash', 'dash_widevine', 'dash_playready'):
this_formats = self._extract_mpd_formats(
watch_url, video_id, mpd_id=format_id, fatal=False)
cid = self._extract_cid(video_id, channel_name)
info_dict = {
'id': channel_name,
- 'title': self._live_title(channel_name),
+ 'title': channel_name,
'is_live': True,
}
else:
}
def _real_extract(self, url):
- channel_name, video_id = re.match(self._VALID_URL, url).groups()
+ channel_name, video_id = self._match_valid_url(url).groups()
return self._extract_video(channel_name, video_id)
}]
def _real_extract(self, url):
- channel_name, video_id, record_id = re.match(self._VALID_URL, url).groups()
+ channel_name, video_id, record_id = self._match_valid_url(url).groups()
return self._extract_video(channel_name, video_id, record_id)