- webpage = self._download_webpage(
- url, video_id, note="Downloading episode page",
- errnote="Video may not be available for your location")
- vid_formats = re.findall(r"\?quality=q([0-9]+)", webpage)
-
- show_meta = json.loads(
- self._search_regex(r'\s+var show = (\{.+?\});', webpage, "show meta"))
- episodes = self._get_episodes(
- webpage, episode_filter=lambda x: x['id'] == video_id)
-
- title = episodes[0]["name"]
- description = episodes[0]["description"]
- duration = int(episodes[0]["duration"])
- slug = show_meta["slug"]
+ try:
+ webpage = self._download_webpage(
+ url, video_id, 'Downloading episode page')
+ except ExtractorError as ee:
+ if isinstance(ee.cause, compat_HTTPError) and ee.cause.code == 403:
+ webpage = ee.cause.read()
+ block_message = self._html_search_regex(
+ r'(?s)<div class="block-message">(.+?)</div>', webpage,
+ 'block message', default=None)
+ if block_message:
+ raise ExtractorError(block_message, expected=True)
+ raise