{"record":{"id":"7017bc583a861a01","repo":"ytdl-org/youtube-dl","slug":"error-element-attrib-abstract","errorCode":null,"errorMessage":"error_element.attrib['abstract']","messagePattern":"error_element\\.attrib\\['abstract'\\]","errorType":"exception","errorClass":"ExtractorError","httpStatus":null,"severity":"error","filePath":"youtube_dl/extractor/theplatform.py","lineNumber":51,"sourceCode":"\nclass ThePlatformBaseIE(OnceIE):\n    _TP_TLD = 'com'\n\n    def _extract_theplatform_smil(self, smil_url, video_id, note='Downloading SMIL data'):\n        meta = self._download_xml(\n            smil_url, video_id, note=note, query={'format': 'SMIL'},\n            headers=self.geo_verification_headers())\n        error_element = find_xpath_attr(meta, _x('.//smil:ref'), 'src')\n        if error_element is not None:\n            exception = find_xpath_attr(\n                error_element, _x('.//smil:param'), 'name', 'exception')\n            if exception is not None:\n                if exception.get('value') == 'GeoLocationBlocked':\n                    self.raise_geo_restricted(error_element.attrib['abstract'])\n                elif error_element.attrib['src'].startswith(\n                        'http://link.theplatform.%s/s/errorFiles/Unavailable.'\n                        % self._TP_TLD):\n                    raise ExtractorError(\n                        error_element.attrib['abstract'], expected=True)\n\n        smil_formats = self._parse_smil_formats(\n            meta, smil_url, video_id, namespace=default_ns,\n            # the parameters are from syfy.com, other sites may use others,\n            # they also work for nbc.com\n            f4m_params={'g': 'UXWGVKRWHFSP', 'hdcore': '3.0.3'},\n            transform_rtmp_url=lambda streamer, src: (streamer, 'mp4:' + src))\n\n        formats = []\n        for _format in smil_formats:\n            if OnceIE.suitable(_format['url']):\n                formats.extend(self._extract_once_formats(_format['url']))\n            else:\n                media_url = _format['url']\n                if determine_ext(media_url) == 'm3u8':\n                    hdnea2 = self._get_cookies(media_url).get('hdnea2')\n                    if hdnea2:","sourceCodeStart":33,"sourceCodeEnd":69,"githubUrl":"https://github.com/ytdl-org/youtube-dl/blob/956b8c585591b401a543e409accb163eeaaa1193/youtube_dl/extractor/theplatform.py#L33-L69","documentation":"Raised by thePlatform base extractor when the SMIL manifest contains an error <smil:ref> whose src points at link.theplatform.<tld>/s/errorFiles/Unavailable.*. The human-readable reason is taken from the element's 'abstract' attribute (e.g. 'This video has been removed...'). It is expected=True, so it is treated as a normal content-unavailable condition, not a bug.","triggerScenarios":"A theplatform-fed site (syfy, nbc, etc.) returns a SMIL whose error ref starts with 'http://link.theplatform.<tld>/s/errorFiles/Unavailable.'; happens when the media was taken down, expired, or is otherwise unavailable while the metadata page still loads.","commonSituations":"Clips removed after broadcast windows close; season passes expiring; CDN/token mismatch producing Unavailable.smil; embedding sites keeping article pages alive long after the video asset was deleted upstream at thePlatform.","solutions":["Confirm the video still plays on the originating site in a browser; if the site also shows an error, the asset is gone","Update to the latest youtube-dl/yt-dlp; thePlatform handling has been improved in newer forks","If you control the request, ensure any required auth/Referer cookies are available so the SMIL is not degraded to an error file","Handle ExtractorError with expected=True in batch jobs and skip the URL"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try:\n    ydl.extract_info(theplatform_url)\nexcept ExtractorError as e:\n    if e.expected and 'Unavailable' in str(e):\n        mark_unavailable(url)  # asset removed upstream; skip permanently","preventionTips":["Check embed pages still play video before queueing thePlatform links","Report persistent cases to yt-dlp with --verbose output","Keep auth/Referer cookies for the embedding site when extracting"],"tags":["extractor","smil","theplatform","content-unavailable"],"backgroundTag":null,"analyzedSha":"956b8c585591b401a543e409accb163eeaaa1193","analyzedAt":"2026-08-14T18:59:47.863Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}