{"record":{"id":"a3027ab3d70a7a9c","repo":"ytdl-org/youtube-dl","slug":"unable-to-load-videos","errorCode":null,"errorMessage":"Unable to load videos!","messagePattern":"Unable to load videos!","errorType":"exception","errorClass":"ExtractorError","httpStatus":null,"severity":"error","filePath":"youtube_dl/extractor/miomio.py","lineNumber":75,"sourceCode":"    def _extract_mioplayer(self, webpage, video_id, title, http_headers):\n        xml_config = self._search_regex(\n            r'flashvars=\"type=(?:sina|video)&amp;(.+?)&amp;',\n            webpage, 'xml config')\n\n        # skipping the following page causes lags and eventually connection drop-outs\n        self._request_webpage(\n            'http://www.miomio.tv/mioplayer/mioplayerconfigfiles/xml.php?id=%s&r=%s' % (id, random.randint(100, 999)),\n            video_id)\n\n        vid_config_request = sanitized_Request(\n            'http://www.miomio.tv/mioplayer/mioplayerconfigfiles/sina.php?{0}'.format(xml_config),\n            headers=http_headers)\n\n        # the following xml contains the actual configuration information on the video file(s)\n        vid_config = self._download_xml(vid_config_request, video_id)\n\n        if not int_or_none(xpath_text(vid_config, 'timelength')):\n            raise ExtractorError('Unable to load videos!', expected=True)\n\n        entries = []\n        for f in vid_config.findall('./durl'):\n            segment_url = xpath_text(f, 'url', 'video url')\n            if not segment_url:\n                continue\n            order = xpath_text(f, 'order', 'order')\n            segment_id = video_id\n            segment_title = title\n            if order:\n                segment_id += '-%s' % order\n                segment_title += ' part %s' % order\n            entries.append({\n                'id': segment_id,\n                'url': segment_url,\n                'title': segment_title,\n                'duration': int_or_none(xpath_text(f, 'length', 'duration'), 1000),\n                'http_headers': http_headers,","sourceCodeStart":57,"sourceCodeEnd":93,"githubUrl":"https://github.com/ytdl-org/youtube-dl/blob/956b8c585591b401a543e409accb163eeaaa1193/youtube_dl/extractor/miomio.py#L57-L93","documentation":"Raised by the miomio.tv extractor when the sina.php player-config XML downloads fine but its 'timelength' element is missing, zero, or non-numeric (int_or_none yields None, and `not None` is True). Timelength is the total duration, so an empty config means no video segments can be built. Expected=True.","triggerScenarios":"The initial xml.php request warms the session, then the sina.php POST returns XML without a usable <timelength> — typical when the server rejected the session or the video id is invalid.","commonSituations":"Missing/invalid session handshake (the r= random query on xml.php matters); video deleted on miomio; the sina backend rate-limiting or geo-blocking the config request; service (long defunct) returning empty configs site-wide.","solutions":["Retry the URL once — the warm-up/session handshake is timing-sensitive.","Confirm the video exists at miomio.tv in a browser.","Route through a proxy if the sina.php backend is region-blocked.","Update youtube-dl / yt-dlp; if the service is dead, no client fix applies."],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":"def miomio_config_empty(vid_config):\n    from xml.etree import ElementTree as ET\n    tl = vid_config.find('timelength') if isinstance(vid_config, ET.Element) else None\n    return tl is None or not (tl.text or '').strip().isdigit() or int(tl.text) == 0","tryCatchPattern":"try:\n    info = ydl.extract_info(url, download=False)\nexcept ExtractorError as e:\n    if 'Unable to load videos' in str(e):\n        schedule_retry(url, backoff=30)  # session handshake is flaky; one retry is cheap\n    else:\n        raise","preventionTips":["Retry once — the miomio session warm-up (xml.php) is timing-sensitive.","Space out miomio requests to avoid the sina.php backend refusing sessions."],"tags":["xml-config","session","expected-error"],"backgroundTag":null,"analyzedSha":"956b8c585591b401a543e409accb163eeaaa1193","analyzedAt":"2026-08-14T18:59:47.863Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}