{"record":{"id":"7e68e439fa32d45f","repo":"yt-dlp/yt-dlp","slug":"unable-to-extract-video-url-7e68e4","errorCode":null,"errorMessage":"Unable to extract video URL","messagePattern":"Unable to extract video URL","errorType":"exception","errorClass":"ExtractorError","httpStatus":null,"severity":"error","filePath":"yt_dlp/extractor/museai.py","lineNumber":78,"sourceCode":"        'params': {'allowed_extractors': ['all', '-html5']},\n    }]\n    _EMBED_REGEX = [r'<iframe[^>]*\\bsrc=[\"\\'](?P<url>https://muse\\.ai/embed/\\w+)']\n\n    @classmethod\n    def _extract_embed_urls(cls, url, webpage):\n        yield from super()._extract_embed_urls(url, webpage)\n        for embed_id in re.findall(r'<script>[^<]*\\bMusePlayer\\(\\{[^}<]*\\bvideo:\\s*[\"\\'](\\w+)[\"\\']', webpage):\n            yield f'https://muse.ai/embed/{embed_id}'\n\n    def _real_extract(self, url):\n        video_id = self._match_id(url)\n        webpage = self._download_webpage(f'https://muse.ai/embed/{video_id}', video_id)\n        data = self._search_json(\n            r'player\\.setData\\(', webpage, 'player data', video_id, transform_source=js_to_json)\n\n        source_url = data['url']\n        if not url_or_none(source_url):\n            raise ExtractorError('Unable to extract video URL')\n\n        formats = [{\n            'url': source_url,\n            'format_id': 'source',\n            'quality': 1,\n            **traverse_obj(data, {\n                'ext': ('filename', {determine_ext}),\n                'width': ('width', {int_or_none}),\n                'height': ('height', {int_or_none}),\n                'filesize': ('size', {int_or_none}),\n            }),\n        }]\n        if source_url.endswith('/data'):\n            base_url = f'{source_url[:-5]}/videos'\n            formats.extend(self._extract_m3u8_formats(\n                f'{base_url}/hls.m3u8', video_id, m3u8_id='hls', fatal=False))\n            formats.extend(self._extract_mpd_formats(\n                f'{base_url}/dash.mpd', video_id, mpd_id='dash', fatal=False))","sourceCodeStart":60,"sourceCodeEnd":96,"githubUrl":"https://github.com/yt-dlp/yt-dlp/blob/81ecd58b1394793e6da9998cc19fdb45657f1685/yt_dlp/extractor/museai.py#L60-L96","documentation":"Thrown by MuseAIIE._real_extract (yt_dlp/extractor/museai.py:78). The embed page was downloaded and its player data (the JSON inside player.setData(...)) was parsed, but data['url'] - the media source URL - is not a valid URL (url_or_none fails, typically empty string). With no source URL there is no format to build, so extraction aborts.","triggerScenarios":"GET https://muse.ai/embed/<video_id> where the captured player JSON has an empty/absent 'url': deleted or private video, expired share link, DRM/protected stream that exposes no plain source, or a change in the embed page's JS data shape.","commonSituations":"Video deleted or made private after the link was saved; unauthenticated access to paid/protected muse.ai content; muse.ai changing the embed player payload so 'url' is no longer populated.","solutions":["Open https://muse.ai/embed/<id> in a logged-out browser and confirm the video still plays","Update yt-dlp to latest nightly in case the player-data JSON shape changed","If the video needs an account, pass cookies: --cookies-from-browser BROWSER or --cookies FILE","Check for DRM (Widevine) - yt-dlp cannot download DRM streams and this error is the usual symptom","If it plays in a browser but still fails, report with --verbose to yt-dlp"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"from yt_dlp.utils import ExtractorError\ntry:\n    info = ydl.extract_info(url, download=False)\nexcept ExtractorError as e:\n    if 'Unable to extract video URL' in str(e):\n        # player data parsed but data['url'] not a URL: deleted/private/DRM video\n        mark_unavailable(video_id)","preventionTips":["Validate muse.ai share links by loading the embed page (HTTP 200 + plays) before queueing downloads","Pass cookies for account-gated videos rather than relying on anonymous access","Handle 'no source URL' as a permanent condition: do not blind-retry it"],"tags":["yt-dlp","extractor","museai","video-url","embed"],"backgroundTag":"media-source-url-missing","analyzedSha":"81ecd58b1394793e6da9998cc19fdb45657f1685","analyzedAt":"2026-08-22T12:21:25.439Z","schemaVersion":2},"datasetVersion":"2026-08-22T14:17:55.899Z"}