{"record":{"id":"904d3ad23418b94b","repo":"ytdl-org/youtube-dl","slug":"clean-html-container-div","errorCode":null,"errorMessage":"clean_html(container_div)","messagePattern":"clean_html\\(container_div\\)","errorType":"exception","errorClass":"ExtractorError","httpStatus":null,"severity":"warning","filePath":"youtube_dl/extractor/xfileshare.py","lineNumber":207,"sourceCode":"        def yield_urls():\n            for regex in cls._EMBED_REGEX:\n                for mobj in re.finditer(regex, webpage):\n                    yield mobj.group('url')\n\n        return list(yield_urls())\n\n    def _real_extract(self, url):\n        host, video_id = self._match_valid_url(url).group('host', 'id')\n\n        url = 'https://%s/%s' % (\n            host,\n            'embed-%s.html' % video_id if host in ('govid.me', 'vidlo.us') else video_id)\n        webpage = self._download_webpage(url, video_id)\n        container_div = get_element_by_id('container', webpage) or webpage\n        if self._search_regex(\n                r'>This server is in maintenance mode\\.', container_div,\n                'maint error', group=0, default=None):\n            raise ExtractorError(clean_html(container_div), expected=True)\n        if self._search_regex(\n                self._FILE_NOT_FOUND_REGEXES, container_div,\n                'missing video error', group=0, default=None):\n            raise ExtractorError('Video %s does not exist' % video_id, expected=True)\n\n        fields = self._hidden_inputs(webpage)\n\n        if fields.get('op') == 'download1':\n            countdown = int_or_none(self._search_regex(\n                r'<span id=\"countdown_str\">(?:[Ww]ait)?\\s*<span id=\"cxc\">(\\d+)</span>\\s*(?:seconds?)?</span>',\n                webpage, 'countdown', default=None))\n            if countdown:\n                self._sleep(countdown, video_id)\n\n            webpage = self._download_webpage(\n                url, video_id, 'Downloading video page',\n                data=urlencode_postdata(fields), headers={\n                    'Referer': url,","sourceCodeStart":189,"sourceCodeEnd":225,"githubUrl":"https://github.com/ytdl-org/youtube-dl/blob/956b8c585591b401a543e409accb163eeaaa1193/youtube_dl/extractor/xfileshare.py#L189-L225","documentation":"Raised by the XFileShare-family extractor when the embed page's container div contains '>This server is in maintenance mode.'. The full container markup is passed through clean_html and raised verbatim, so the user sees the host's maintenance notice text.","triggerScenarios":"Downloading from any of the many XFileShare mirrors (govid.me, vidlo.us, etc.) while the specific host displays its maintenance-mode banner in the #container element.","commonSituations":"File-locker hosts going down for maintenance or being seized; per-host outages while sister mirrors still work; link lists spanning many unstable mirrors.","solutions":["Wait and retry later — maintenance mode is temporary by definition.","Try a mirror of the same video on another host from the extractor's _VALID_URL list.","Check the host's main site in a browser to confirm the maintenance notice.","In batch runs, use --ignore-errors and requeue failed items after a delay."],"exampleFix":null,"handlingStrategy":"retry","validationCode":"if 'This server is in maintenance mode' in webpage:\n    schedule_retry(url, delay_hours=6)","typeGuard":null,"tryCatchPattern":"try:\n    info = ydl.extract_info(url)\nexcept ExtractorError as e:\n    if 'maintenance mode' in str(e):\n        requeue_later(url, delay=6 * 3600)\n    else:\n        raise","preventionTips":["Mark maintenance-mode failures as retryable in job queues; other failures as permanent.","Keep alternative mirror URLs for the same content.","Probe host availability before launching large batches against file lockers."],"tags":["maintenance","host-unavailable","retry","extractor","xfileshare"],"backgroundTag":null,"analyzedSha":"956b8c585591b401a543e409accb163eeaaa1193","analyzedAt":"2026-08-14T18:59:47.863Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}