ytdl-org/youtube-dl · error · ExtractorError
Simplestream ID not found
Error message
Simplestream ID not found
What it means
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.
Source
Thrown at youtube_dl/extractor/gbnews.py:81
data-id="GB001"
data-type="vod"
data-key="3Li3Nt2Qs8Ct3Xq9Fi5Uy0Mb2Bj0Qs"
data-token="f9c317c727dc07f515b20036c8ef14a6"
data-expiry="1624300052"
data-uvid="37900558"
data-poster="https://thumbnails.simplestreamcdn.com/gbnews/ondemand/37900558.jpg?width=700&"
data-npaw="false"
data-env="production">
'''
# exception if no match
video_data = self._search_regex(
r'(<div\s[^>]*\bclass\s*=\s*(\'|")(?!.*sidebar\b)simplestream(?:\s[\s\w$-]*)?\2[^>]*>)',
webpage, 'video data')
video_data = extract_attributes(video_data)
ss_id = video_data.get('data-id')
if not ss_id:
raise ExtractorError('Simplestream ID not found')
json_data = self._download_json(
self._SSMP_URL, display_id,
note='Downloading Simplestream JSON metadata',
errnote='Unable to download Simplestream JSON metadata',
query={
'id': ss_id,
'env': video_data.get('data-env', 'production'),
}, fatal=False)
meta_url = traverse_obj(json_data, ('response', 'api_hostname'))
if not meta_url:
raise ExtractorError('No API host found')
uvid = video_data['data-uvid']
dtype = video_data.get('data-type')
stream_data = self._download_json(
'%s/api/%s/stream/%s' % (meta_url, 'show' if dtype == 'vod' else dtype, uvid),View on GitHub (pinned to 956b8c5855)
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
Defensive patterns
Strategy: try-catch
Validate before calling
import re
from youtube_dl.utils import extract_attributes
m = re.search(r'(<div\s[^>]*\bclass\s*=\s*(\'|\")(?!.*sidebar\\b)simplestream(?:\s[\s\w$-]*)?\2[^>]*>)', html)
if m and not extract_attributes(m.group(1)).get('data-id'):
print('Page markup lacks data-id; extractor will fail') Type guard
def has_simplestream_id(webpage):
m = re.search(r'class\s*=\s*[\"\']simplestream', webpage)
return bool(m) and 'data-id=' in webpage Try / catch
try:
info = ydl.extract_info(gbnews_url)
except DownloadError as e:
if 'Simplestream ID not found' in str(e):
report_site_markup_change(url) # upstream bug, not user error
else:
raise Prevention
- 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
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- No API host found
- Unsupported URL: %s
- Redirect loop: %s
- No sources found for video %s. Maybe a plain image?
- Can't find any video
AI-assisted analysis of ytdl-org/youtube-dl@956b8c5855 (2026-08-14).
Data as JSON: /api/errors/51fcf17419811cea.
Report an issue: GitHub.