{"record":{"id":"6c344fe4c2911c5f","repo":"ytdl-org/youtube-dl","slug":"s-returned-error-s-s-6c344f","errorCode":null,"errorMessage":"%s returned error: %s - %s","messagePattern":"(.+?) returned error: (.+?) - (.+?)","errorType":"exception","errorClass":"ExtractorError","httpStatus":null,"severity":"error","filePath":"youtube_dl/extractor/sport5.py","lineNumber":52,"sourceCode":"            'skip': 'Blocked outside of Israel',\n        }\n    ]\n\n    def _real_extract(self, url):\n        mobj = re.match(self._VALID_URL, url)\n        media_id = mobj.group('id')\n\n        webpage = self._download_webpage(url, media_id)\n\n        video_id = self._html_search_regex(r'clipId=([\\w-]+)', webpage, 'video id')\n\n        metadata = self._download_xml(\n            'http://sport5-metadata-rr-d.nsacdn.com/vod/vod/%s/HDS/metadata.xml' % video_id,\n            video_id)\n\n        error = metadata.find('./Error')\n        if error is not None:\n            raise ExtractorError(\n                '%s returned error: %s - %s' % (\n                    self.IE_NAME,\n                    error.find('./Name').text,\n                    error.find('./Description').text),\n                expected=True)\n\n        title = metadata.find('./Title').text\n        description = metadata.find('./Description').text\n        duration = int(metadata.find('./Duration').text)\n\n        posters_el = metadata.find('./PosterLinks')\n        thumbnails = [{\n            'url': thumbnail.text,\n            'width': int(thumbnail.get('width')),\n            'height': int(thumbnail.get('height')),\n        } for thumbnail in posters_el.findall('./PosterIMG')] if posters_el is not None else []\n\n        categories_el = metadata.find('./Categories')","sourceCodeStart":34,"sourceCodeEnd":70,"githubUrl":"https://github.com/ytdl-org/youtube-dl/blob/956b8c585591b401a543e409accb163eeaaa1193/youtube_dl/extractor/sport5.py#L34-L70","documentation":"Sport5IE downloads the site's metadata.xml for a clip; if the XML root contains an <Error> element, the child <Name> and <Description> texts are formatted into '<Sport5> returned error: <name> - <description>' and raised as expected. This is the CDN's structured way of reporting dead or inaccessible clips instead of an HTTP error.","triggerScenarios":"Fetching http://sport5-metadata-rr-d.nsacdn.com/vod/vod/<clipId>/HDS/metadata.xml for a clipId scraped from the page where the XML is <Error><Name>...<Description>...</Error>. Occurs for removed/expired VOD clips or ids for content no longer served.","commonSituations":"Old sport5.co.il article links whose video clips expired (Israeli sports VOD has short retention); clip ids changed after site migration; the metadata CDN serving errors during maintenance windows.","solutions":["Read the Name/Description text - it names the exact failure.","Open the article page in a browser to check whether the video still plays.","Retry later if the site was under maintenance; otherwise find the clip on another source.","Update yt-dlp - sport5's endpoints have changed over time and the extractor was since reworked."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"meta = requests.get(metadata_xml_url).content\nif b'<Error>' in meta:\n    skip(video_id)  # CDN already reports the clip dead","typeGuard":"def metadata_has_error(xml_bytes: bytes) -> bool:\n    return b'<Error>' in xml_bytes","tryCatchPattern":"try:\n    extract(url)\nexcept ExtractorError as e:\n    if 'returned error:' in str(e):\n        drop(video_id)\n    else:\n        raise","preventionTips":["Pre-check metadata.xml for an Error element in crawlers.","Expect short retention on news VOD; archive early.","Distinguish maintenance-window errors (retry) from removal errors (drop) by the Description text."],"tags":["sport5","metadata-xml","dead-link","extractor"],"backgroundTag":null,"analyzedSha":"956b8c585591b401a543e409accb163eeaaa1193","analyzedAt":"2026-08-14T18:59:47.863Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}