ytdl-org/youtube-dl · error · ExtractorError

Unable to load data. Error code: %s

Error message

Unable to load data. Error code: %s

What it means

Raised by IqiyiIE after the bidispatch API (get_raw_data) returns a 'code' other than the success code 'A00000'. The raw API error code is appended so the user can look it up; note that geo-block code 'A00111' is handled separately via raise_geo_restricted before this raise.

Source

Thrown at youtube_dl/extractor/iqiyi.py:364

        tvid = self._search_regex(
            r'data-(?:player|shareplattrigger)-tvid\s*=\s*[\'"](\d+)', webpage, 'tvid', default=None)
        if tvid is None:
            playlist_result = self._extract_playlist(webpage)
            if playlist_result:
                return playlist_result
            raise ExtractorError('Can\'t find any video')

        video_id = self._search_regex(
            r'data-(?:player|shareplattrigger)-videoid\s*=\s*[\'"]([a-f\d]+)', webpage, 'video_id')

        formats = []
        for _ in range(5):
            raw_data = self.get_raw_data(tvid, video_id)

            if raw_data['code'] != 'A00000':
                if raw_data['code'] == 'A00111':
                    self.raise_geo_restricted()
                raise ExtractorError('Unable to load data. Error code: ' + raw_data['code'])

            data = raw_data['data']

            for stream in data['vidl']:
                if 'm3utx' not in stream:
                    continue
                vd = compat_str(stream['vd'])
                formats.append({
                    'url': stream['m3utx'],
                    'format_id': vd,
                    'ext': 'mp4',
                    'preference': self._FORMATS_MAP.get(vd, -1),
                    'protocol': 'm3u8_native',
                })

            if formats:
                break

View on GitHub (pinned to 956b8c5855)

Solutions

  1. Look up the reported code: A00103/A00113-style codes usually mean VIP content or expired tickets.
  2. Verify the video is free to watch in a browser from your region.
  3. Update youtube-dl/yt-dlp - signature algorithm changes produce non-A00000 codes en masse.
  4. Retry after some minutes for transient API failures.
Defensive patterns

Strategy: retry

Try / catch

try:
    ydl.extract_info(url)
except ExtractorError as e:
    if str(e).startswith('Unable to load data. Error code: A001'):
        # geo/VIP family: check code, either reroute region or mark VIP-only
        classify_iqiyi_code(str(e))
    else:
        retry_with_backoff(url, attempts=3)

Prevention

When it happens

Trigger: get_raw_data(tvid, video_id) responses with codes such as expired tickets, VIP-only content, or server-side rejection - anything that is not A00000 and not the geo code A00111. The retry loop attempts this up to 5 times before the error escapes.

Common situations: VIP/member-only iQiyi videos without credentials, expired or unsigned API requests (the SDK signature from error 169 failing server-side), or temporarily degraded API responses.

Related errors


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