- type_url, video_id, episode = self._match_valid_url(url).group('type', 'id', 'episode')
- webpage = self._download_webpage(url, video_id=video_id, fatal=False)
- info = self._download_json(self.get_api_with_st_token(video_id, episode or 0), video_id)
+ video_id, slug_episode = self._match_valid_url(url).group('id', 'episode')
+ webpage = self._download_webpage(url, video_id=video_id, fatal=False) or ''
+ title = self._search_regex(
+ r'(?s)<h4\s+class="mb-1 text-2xl text-white"[^>]*>(.+)</h4>', webpage, 'title', fatal=False)
+ real_episode = slug_episode if not title else self._search_regex(
+ r'<p.+title="(?P<episode>[^">]+)"\s+class="epi-title active"', webpage, 'episode', fatal=False)
+ title = strip_or_none(title) or self._html_search_meta(('og:title', 'twitter:title'), webpage)
+
+ info = self._download_json(
+ self.get_api_with_st_token(video_id, int(slug_episode) - 1 if slug_episode else 0), video_id)