ytdl-org/youtube-dl · error · ExtractorError
%s said: %s
Error message
%s said: %s
What it means
Raised by TVPIE when the tvp.pl.tvplayer.php page contains a 'notAvailable__text' paragraph or a 'msg error' element — i.e. the station's own page declares the material unavailable (usually geo-restricted to Poland, or the material was removed). The extractor scrapes that DOM error node and rethrows it verbatim. Expected error.
Source
Thrown at youtube_dl/extractor/tvp.py:128
},
'skip': 'Transmisja została zakończona lub materiał niedostępny',
}, {
'url': 'tvp:22670268',
'only_matching': True,
}]
def _real_extract(self, url):
video_id = self._match_id(url)
webpage = self._download_webpage(
'http://www.tvp.pl/sess/tvplayer.php?object_id=%s' % video_id, video_id)
error = self._html_search_regex(
r'(?s)<p[^>]+\bclass=["\']notAvailable__text["\'][^>]*>(.+?)</p>',
webpage, 'error', default=None) or clean_html(
get_element_by_attribute('class', 'msg error', webpage))
if error:
raise ExtractorError('%s said: %s' % (
self.IE_NAME, clean_html(error)), expected=True)
title = self._search_regex(
r'name\s*:\s*([\'"])Title\1\s*,\s*value\s*:\s*\1(?P<title>.+?)\1',
webpage, 'title', group='title')
series_title = self._search_regex(
r'name\s*:\s*([\'"])SeriesTitle\1\s*,\s*value\s*:\s*\1(?P<series>.+?)\1',
webpage, 'series', group='series', default=None)
if series_title:
title = '%s, %s' % (series_title, title)
thumbnail = self._search_regex(
r"poster\s*:\s*'([^']+)'", webpage, 'thumbnail', default=None)
video_url = self._search_regex(
r'0:{src:([\'"])(?P<url>.*?)\1', webpage,
'formats', group='url', default=None)
if not video_url or 'material_niedostepny.mp4' in video_url:View on GitHub (pinned to 956b8c5855)
Solutions
- If the notice mentions territory, use a Polish IP/VPN.
- Open the tvp.pl page in a browser to read the exact notice and confirm the material still exists.
- Look for the item on TVP VOD's newer domain (vod.tvp.pl) and use its extractor/URL.
- Update to yt-dlp for the rewritten TVP extractors.
Defensive patterns
Strategy: try-catch
Validate before calling
import requests
html = requests.get('http://www.tvp.pl/sess/tvplayer.php?object_id=' + video_id).text
if 'notAvailable__text' in html or 'msg error' in html:
skip(video_id, 'TVP reports unavailable') Type guard
def tvp_unavailable(html: str) -> bool:
return 'notAvailable__text' in html or 'class="msg error"' in html Try / catch
try:
ydl.extract_info(url)
except ExtractorError as e:
if 'said:' in str(e) and ('dost' in str(e) or 'unavailable' in str(e).lower()):
mark_geo_or_removed(url)
else:
raise Prevention
- Pre-check the player page HTML for the notAvailable marker before downloading.
- Use a Polish IP for Poland-territorial TVP content.
When it happens
Trigger: Downloading http://www.tvp.pl/sess/tvplayer.php?object_id=<id> whose HTML matches <p class="notAvailable__text">…</p> or contains an element with class 'msg error' — typically 'materiał niedostępny' (material unavailable) or a territorial notice.
Common situations: Accessing TVP VOD from outside Poland, deleted archive items, expired live-stream windows, regional content blocked by broadcaster policy.
Related errors
- %s returned error: %s
- %s returned error: %s
- Episode %s is not yet available
- Episode %s is no longer available
- Episode %s is not currently available
AI-assisted analysis of ytdl-org/youtube-dl@956b8c5855 (2026-08-14).
Data as JSON: /api/errors/e896bc5369f1c6b5.
Report an issue: GitHub.