{"record":{"id":"51fcf17419811cea","repo":"ytdl-org/youtube-dl","slug":"simplestream-id-not-found","errorCode":null,"errorMessage":"Simplestream ID not found","messagePattern":"Simplestream ID not found","errorType":"exception","errorClass":"ExtractorError","httpStatus":null,"severity":"error","filePath":"youtube_dl/extractor/gbnews.py","lineNumber":81,"sourceCode":"            data-id=\"GB001\"\n            data-type=\"vod\"\n            data-key=\"3Li3Nt2Qs8Ct3Xq9Fi5Uy0Mb2Bj0Qs\"\n            data-token=\"f9c317c727dc07f515b20036c8ef14a6\"\n            data-expiry=\"1624300052\"\n            data-uvid=\"37900558\"\n            data-poster=\"https://thumbnails.simplestreamcdn.com/gbnews/ondemand/37900558.jpg?width=700&\"\n            data-npaw=\"false\"\n            data-env=\"production\">\n        '''\n        # exception if no match\n        video_data = self._search_regex(\n            r'(<div\\s[^>]*\\bclass\\s*=\\s*(\\'|\")(?!.*sidebar\\b)simplestream(?:\\s[\\s\\w$-]*)?\\2[^>]*>)',\n            webpage, 'video data')\n\n        video_data = extract_attributes(video_data)\n        ss_id = video_data.get('data-id')\n        if not ss_id:\n            raise ExtractorError('Simplestream ID not found')\n\n        json_data = self._download_json(\n            self._SSMP_URL, display_id,\n            note='Downloading Simplestream JSON metadata',\n            errnote='Unable to download Simplestream JSON metadata',\n            query={\n                'id': ss_id,\n                'env': video_data.get('data-env', 'production'),\n            }, fatal=False)\n\n        meta_url = traverse_obj(json_data, ('response', 'api_hostname'))\n        if not meta_url:\n            raise ExtractorError('No API host found')\n\n        uvid = video_data['data-uvid']\n        dtype = video_data.get('data-type')\n        stream_data = self._download_json(\n            '%s/api/%s/stream/%s' % (meta_url, 'show' if dtype == 'vod' else dtype, uvid),","sourceCodeStart":63,"sourceCodeEnd":99,"githubUrl":"https://github.com/ytdl-org/youtube-dl/blob/956b8c585591b401a543e409accb163eeaaa1193/youtube_dl/extractor/gbnews.py#L63-L99","documentation":"Raised by the GB News extractor when the regex for the simplestream <div> matched on the webpage but the matched element has no data-id attribute. It is raised without expected=True, so youtube-dl treats it as an unexpected extractor failure and asks for a bug report.","triggerScenarios":"Extracting any GB News (gbnews.py) video/show page where the simplestream player div exists but its data-id attribute was renamed or removed, or where the regex matched a different simplestream container (e.g. a sidebar-adjacent block) that lacks data-id.","commonSituations":"GB News changes its embed markup, ships an A/B-tested player, or serves an error/consent page that still contains a partial simplestream div. Also occurs on youtube-dl versions predating a markup change.","solutions":["Update youtube-dl/yt-dlp to the latest version (markup-change fixes land quickly)","Open the page in a browser, inspect the simplestream div, and confirm which attribute now carries the Simplestream ID","If broken in the latest version, report the issue with the full -v output and the URL","As a workaround, grab the stream URL from browser devtools (the /api/.../stream/<uvid> call) and pass it directly"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"import re\nfrom youtube_dl.utils import extract_attributes\nm = re.search(r'(<div\\s[^>]*\\bclass\\s*=\\s*(\\'|\\\")(?!.*sidebar\\\\b)simplestream(?:\\s[\\s\\w$-]*)?\\2[^>]*>)', html)\nif m and not extract_attributes(m.group(1)).get('data-id'):\n    print('Page markup lacks data-id; extractor will fail')","typeGuard":"def has_simplestream_id(webpage):\n    m = re.search(r'class\\s*=\\s*[\\\"\\']simplestream', webpage)\n    return bool(m) and 'data-id=' in webpage","tryCatchPattern":"try:\n    info = ydl.extract_info(gbnews_url)\nexcept DownloadError as e:\n    if 'Simplestream ID not found' in str(e):\n        report_site_markup_change(url)  # upstream bug, not user error\n    else:\n        raise","preventionTips":["Pin a recent youtube-dl/yt-dlp version and update when news sites redesign","For news-site pipelines, validate the page still contains the player div before extraction","Keep browser-devtools fallback for pulling the stream URL manually"],"tags":["gbnews","extractor","scraping","markup-change"],"backgroundTag":null,"analyzedSha":"956b8c585591b401a543e409accb163eeaaa1193","analyzedAt":"2026-08-14T18:59:47.863Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}