{"record":{"id":"f7539662ffca0a6c","repo":"yt-dlp/yt-dlp","slug":"this-course-episode-is-not-yet-available","errorCode":null,"errorMessage":"This course episode is not yet available.","messagePattern":"This course episode is not yet available\\.","errorType":"exception","errorClass":"ExtractorError","httpStatus":null,"severity":"error","filePath":"yt_dlp/extractor/bilibili.py","lineNumber":1202,"sourceCode":"        webpage = self._download_webpage(url, ss_id)\n        metainfo = traverse_obj(\n            self._search_json(r'<script[^>]+type=\"application/ld\\+json\"[^>]*>', webpage, 'info', ss_id),\n            ('itemListElement', ..., {\n                'title': ('name', {str}),\n                'description': ('description', {str}),\n            }), get_all=False)\n\n        return self.playlist_result(self._get_episodes_from_season(ss_id, url), ss_id, **metainfo)\n\n\nclass BilibiliCheeseBaseIE(BilibiliBaseIE):\n    def _extract_episode(self, season_info, ep_id):\n        episode_info = traverse_obj(season_info, (\n            'episodes', lambda _, v: v['id'] == int(ep_id)), get_all=False)\n        aid, cid = episode_info['aid'], episode_info['cid']\n\n        if traverse_obj(episode_info, 'ep_status') == -1:\n            raise ExtractorError('This course episode is not yet available.', expected=True)\n        if not traverse_obj(episode_info, 'playable'):\n            self.raise_login_required('You need to purchase the course to download this episode')\n\n        play_info = self._download_json(\n            'https://api.bilibili.com/pugv/player/web/playurl', ep_id,\n            query={'avid': aid, 'cid': cid, 'ep_id': ep_id, 'fnval': 16, 'fourk': 1},\n            headers=self._HEADERS, note='Downloading playinfo')['data']\n\n        return {\n            'id': str_or_none(ep_id),\n            'episode_id': str_or_none(ep_id),\n            'formats': self.extract_formats(play_info),\n            'extractor_key': BilibiliCheeseIE.ie_key(),\n            'extractor': BilibiliCheeseIE.IE_NAME,\n            'webpage_url': f'https://www.bilibili.com/cheese/play/ep{ep_id}',\n            **traverse_obj(episode_info, {\n                'episode': ('title', {str}),\n                'title': {lambda v: v and join_nonempty('index', 'title', delim=' - ', from_dict=v)},","sourceCodeStart":1184,"sourceCodeEnd":1220,"githubUrl":"https://github.com/yt-dlp/yt-dlp/blob/81ecd58b1394793e6da9998cc19fdb45657f1685/yt_dlp/extractor/bilibili.py#L1184-L1220","documentation":"Expected error raised by BilibiliCheeseBaseIE._extract_episode when the course episode's ep_status field equals -1. Cheese (pugv) courses publish episode metadata ahead of release; ep_status == -1 marks an episode that has not aired/been unlocked yet, so the extractor fails fast instead of calling the playurl API for media that cannot exist.","triggerScenarios":"Downloading a full Cheese course playlist where later episodes are scheduled but not yet published; direct ep URLs for pre-announced episodes; episodes gated behind a course start date.","commonSituations":"Batch archiving a course on day one; users misreading 'coming soon' episode entries as available; timezone confusion about release times.","solutions":["Check the episode list on bilibili.com — episodes with a future unlock time are not fetchable; retry after the scheduled release.","Restrict your download to published episodes (e.g. --playlist-items with the aired range).","If the episode is visibly playable in a browser, update yt-dlp and report it (the ep_status semantics may have changed)."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"# if you already have the season_info JSON (e.g. via API wrapper)\nep = next(e for e in season_info['episodes'] if e['id'] == int(ep_id))\nif ep.get('ep_status') == -1:\n    schedule_retry_after_release(ep.get('publish_time'), ep_id)  # skip for now","typeGuard":"def cheese_episode_ready(ep) -> bool:\n    return isinstance(ep, dict) and ep.get('ep_status') != -1 and ep.get('playable')","tryCatchPattern":"try:\n    info = ydl.extract_info(url, download=False)\nexcept ExtractorError as e:\n    if 'not yet available' in str(e):\n        schedule_retry(url, after=release_date)  # scheduled content; not an error\n    else:\n        raise","preventionTips":["Restrict --playlist-items to already-aired episodes","Treat ep_status == -1 as 'scheduled', never retry immediately","Watch the course page for unlock dates instead of polling"],"tags":["bilibili","cheese","course","not-yet-released","expected-error","extractor"],"backgroundTag":"content-not-yet-released","analyzedSha":"81ecd58b1394793e6da9998cc19fdb45657f1685","analyzedAt":"2026-08-22T12:21:25.439Z","schemaVersion":2},"datasetVersion":"2026-08-22T14:17:55.899Z"}