{"record":{"id":"bd8ee949922ccc04","repo":"ytdl-org/youtube-dl","slug":"unsupported-url-s","errorCode":null,"errorMessage":"Unsupported URL: %s","messagePattern":"Unsupported URL: (.+?)","errorType":"exception","errorClass":"UnsupportedError","httpStatus":null,"severity":"error","filePath":"youtube_dl/extractor/brightcove.py","lineNumber":338,"sourceCode":"                            'http://link.brightcove.com/services/player/bcpid' + player_id[0],\n                            video_id, headers=headers, fatal=False)\n                        if player_page:\n                            player_key = self._search_regex(\n                                r'<param\\s+name=\"playerKey\"\\s+value=\"([\\w~,-]+)\"',\n                                player_page, 'player key', fatal=False)\n                if player_key:\n                    enc_pub_id = player_key.split(',')[1].replace('~', '=')\n                    publisher_id = struct.unpack('>Q', base64.urlsafe_b64decode(enc_pub_id))[0]\n            if publisher_id:\n                brightcove_new_url = 'http://players.brightcove.net/%s/default_default/index.html?videoId=%s' % (publisher_id, video_id)\n                if referer:\n                    brightcove_new_url = smuggle_url(brightcove_new_url, {'referrer': referer})\n                return self.url_result(brightcove_new_url, BrightcoveNewIE.ie_key(), video_id)\n        # TODO: figure out if it's possible to extract playlistId from playerKey\n        # elif 'playerKey' in query:\n        #     player_key = query['playerKey']\n        #     return self._get_playlist_info(player_key[0])\n        raise UnsupportedError(url)\n\n\nclass BrightcoveNewIE(AdobePassIE):\n    IE_NAME = 'brightcove:new'\n    _VALID_URL = r'https?://players\\.brightcove\\.net/(?P<account_id>\\d+)/(?P<player_id>[^/]+)_(?P<embed>[^/]+)/index\\.html\\?.*(?P<content_type>video|playlist)Id=(?P<video_id>\\d+|ref:[^&]+)'\n    _TESTS = [{\n        'url': 'http://players.brightcove.net/929656772001/e41d32dc-ec74-459e-a845-6c69f7b724ea_default/index.html?videoId=4463358922001',\n        'md5': 'c8100925723840d4b0d243f7025703be',\n        'info_dict': {\n            'id': '4463358922001',\n            'ext': 'mp4',\n            'title': 'Meet the man behind Popcorn Time',\n            'description': 'md5:eac376a4fe366edc70279bfb681aea16',\n            'duration': 165.768,\n            'timestamp': 1441391203,\n            'upload_date': '20150904',\n            'uploader_id': '929656772001',\n            'formats': 'mincount:20',","sourceCodeStart":320,"sourceCodeEnd":356,"githubUrl":"https://github.com/ytdl-org/youtube-dl/blob/956b8c585591b401a543e409accb163eeaaa1193/youtube_dl/extractor/brightcove.py#L320-L356","documentation":"Raised as UnsupportedError at the end of BrightcoveLegacyIE._real_extract when the URL could not be converted into anything the extractor supports: it only proceeds if it can derive a publisher_id (from an account id or by base64-decoding the second part of a playerKey), otherwise it falls through to 'raise UnsupportedError(url)'. UnsupportedError tells youtube-dl's dispatcher that this IE cannot handle the link.","triggerScenarios":"A URL matched the Brightcove legacy IE pattern but contained neither a usable account/publisher id nor a playerKey whose base64 portion decodes to a publisher id; also reached when 'playerKey' playlist handling is disabled (the elif branch is commented out in the source).","commonSituations":"Hand-crafted or stale brightcove URLs missing the account id; pages that changed their embed scheme so the URL captured by the user (or a generic extractor pass) no longer carries the ids the extractor needs.","solutions":["Use the full new-style player URL: https://players.brightcove.net/<account_id>/<player>_default/index.html?videoId=<video_id> — the account id is the numeric path segment.","If only a playerKey is known, decode the publisher id yourself: player_key.split(',')[1].replace('~','=') then base64 urlsafe-decode and struct.unpack('>Q', ...), and build the players.brightcove.net URL.","Update to yt-dlp, which has extended Brightcove URL support.","Extract from the original article page rather than the bare player URL."],"exampleFix":"# before\nydl.extract('http://link.brightcove.com/services/player/bcpid123')  # no account info derivable\n\n# after\naccount_id = struct.unpack('>Q', base64.urlsafe_b64decode(player_key.split(',')[1].replace('~', '=')))[0]\nydl.extract('http://players.brightcove.net/%d/default_default/index.html?videoId=%s' % (account_id, video_id))","handlingStrategy":"validation","validationCode":"import re, struct, base64\n# Validate before extracting: URL must expose an account id or decodable playerKey\nm = re.search(r'players\\.brightcove\\.net/(\\d+)/', url)\nif not m and 'playerKey' not in url:\n    raise ValueError('URL carries no Brightcove account id; cannot extract')\nif 'playerKey=' in url:\n    key = re.search(r'playerKey=([^&]+)', url).group(1)\n    account = struct.unpack('>Q', base64.urlsafe_b64decode(key.split(',')[1].replace('~', '=')))[0]","typeGuard":null,"tryCatchPattern":"from youtube_dl.utils import UnsupportedError\ntry:\n    ydl.extract_info(url)\nexcept UnsupportedError:\n    # let youtube-dl try other extractors / generic\n    ydl.extract_info(url, force_generic_extractor=True)","preventionTips":["Always capture the full player URL including the numeric account id path segment.","Keep a mapping of site -> direct player URL template instead of scraping embed pages.","Treat UnsupportedError as a routing signal, not a hard failure."],"tags":["brightcove","unsupported-url","extractor"],"backgroundTag":null,"analyzedSha":"956b8c585591b401a543e409accb163eeaaa1193","analyzedAt":"2026-08-14T18:59:47.863Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}