ytdl-org/youtube-dl · error · ExtractorError

Unable to load videos!

Error message

Unable to load videos!

What it means

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.

Source

Thrown at youtube_dl/extractor/miomio.py:75

    def _extract_mioplayer(self, webpage, video_id, title, http_headers):
        xml_config = self._search_regex(
            r'flashvars="type=(?:sina|video)&(.+?)&',
            webpage, 'xml config')

        # skipping the following page causes lags and eventually connection drop-outs
        self._request_webpage(
            'http://www.miomio.tv/mioplayer/mioplayerconfigfiles/xml.php?id=%s&r=%s' % (id, random.randint(100, 999)),
            video_id)

        vid_config_request = sanitized_Request(
            'http://www.miomio.tv/mioplayer/mioplayerconfigfiles/sina.php?{0}'.format(xml_config),
            headers=http_headers)

        # the following xml contains the actual configuration information on the video file(s)
        vid_config = self._download_xml(vid_config_request, video_id)

        if not int_or_none(xpath_text(vid_config, 'timelength')):
            raise ExtractorError('Unable to load videos!', expected=True)

        entries = []
        for f in vid_config.findall('./durl'):
            segment_url = xpath_text(f, 'url', 'video url')
            if not segment_url:
                continue
            order = xpath_text(f, 'order', 'order')
            segment_id = video_id
            segment_title = title
            if order:
                segment_id += '-%s' % order
                segment_title += ' part %s' % order
            entries.append({
                'id': segment_id,
                'url': segment_url,
                'title': segment_title,
                'duration': int_or_none(xpath_text(f, 'length', 'duration'), 1000),
                'http_headers': http_headers,

View on GitHub (pinned to 956b8c5855)

Solutions

  1. Retry the URL once — the warm-up/session handshake is timing-sensitive.
  2. Confirm the video exists at miomio.tv in a browser.
  3. Route through a proxy if the sina.php backend is region-blocked.
  4. Update youtube-dl / yt-dlp; if the service is dead, no client fix applies.
Defensive patterns

Strategy: retry

Type guard

def miomio_config_empty(vid_config):
    from xml.etree import ElementTree as ET
    tl = vid_config.find('timelength') if isinstance(vid_config, ET.Element) else None
    return tl is None or not (tl.text or '').strip().isdigit() or int(tl.text) == 0

Try / catch

try:
    info = ydl.extract_info(url, download=False)
except ExtractorError as e:
    if 'Unable to load videos' in str(e):
        schedule_retry(url, backoff=30)  # session handshake is flaky; one retry is cheap
    else:
        raise

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


AI-assisted analysis of ytdl-org/youtube-dl@956b8c5855 (2026-08-14). Data as JSON: /api/errors/a3027ab3d70a7a9c. Report an issue: GitHub.