{"record":{"id":"e896bc5369f1c6b5","repo":"ytdl-org/youtube-dl","slug":"s-said-s-e896bc","errorCode":null,"errorMessage":"%s said: %s","messagePattern":"%s said: %s","errorType":"exception","errorClass":"ExtractorError","httpStatus":null,"severity":"error","filePath":"youtube_dl/extractor/tvp.py","lineNumber":128,"sourceCode":"        },\n        'skip': 'Transmisja została zakończona lub materiał niedostępny',\n    }, {\n        'url': 'tvp:22670268',\n        'only_matching': True,\n    }]\n\n    def _real_extract(self, url):\n        video_id = self._match_id(url)\n\n        webpage = self._download_webpage(\n            'http://www.tvp.pl/sess/tvplayer.php?object_id=%s' % video_id, video_id)\n\n        error = self._html_search_regex(\n            r'(?s)<p[^>]+\\bclass=[\"\\']notAvailable__text[\"\\'][^>]*>(.+?)</p>',\n            webpage, 'error', default=None) or clean_html(\n            get_element_by_attribute('class', 'msg error', webpage))\n        if error:\n            raise ExtractorError('%s said: %s' % (\n                self.IE_NAME, clean_html(error)), expected=True)\n\n        title = self._search_regex(\n            r'name\\s*:\\s*([\\'\"])Title\\1\\s*,\\s*value\\s*:\\s*\\1(?P<title>.+?)\\1',\n            webpage, 'title', group='title')\n        series_title = self._search_regex(\n            r'name\\s*:\\s*([\\'\"])SeriesTitle\\1\\s*,\\s*value\\s*:\\s*\\1(?P<series>.+?)\\1',\n            webpage, 'series', group='series', default=None)\n        if series_title:\n            title = '%s, %s' % (series_title, title)\n\n        thumbnail = self._search_regex(\n            r\"poster\\s*:\\s*'([^']+)'\", webpage, 'thumbnail', default=None)\n\n        video_url = self._search_regex(\n            r'0:{src:([\\'\"])(?P<url>.*?)\\1', webpage,\n            'formats', group='url', default=None)\n        if not video_url or 'material_niedostepny.mp4' in video_url:","sourceCodeStart":110,"sourceCodeEnd":146,"githubUrl":"https://github.com/ytdl-org/youtube-dl/blob/956b8c585591b401a543e409accb163eeaaa1193/youtube_dl/extractor/tvp.py#L110-L146","documentation":"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.","triggerScenarios":"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.","commonSituations":"Accessing TVP VOD from outside Poland, deleted archive items, expired live-stream windows, regional content blocked by broadcaster policy.","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."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"import requests\nhtml = requests.get('http://www.tvp.pl/sess/tvplayer.php?object_id=' + video_id).text\nif 'notAvailable__text' in html or 'msg error' in html:\n    skip(video_id, 'TVP reports unavailable')","typeGuard":"def tvp_unavailable(html: str) -> bool:\n    return 'notAvailable__text' in html or 'class=\"msg error\"' in html","tryCatchPattern":"try:\n    ydl.extract_info(url)\nexcept ExtractorError as e:\n    if 'said:' in str(e) and ('dost' in str(e) or 'unavailable' in str(e).lower()):\n        mark_geo_or_removed(url)\n    else:\n        raise","preventionTips":["Pre-check the player page HTML for the notAvailable marker before downloading.","Use a Polish IP for Poland-territorial TVP content."],"tags":["geo","extractor","tvp","scraping","availability"],"backgroundTag":null,"analyzedSha":"956b8c585591b401a543e409accb163eeaaa1193","analyzedAt":"2026-08-14T18:59:47.863Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}