{"record":{"id":"fbb54c1f5bbabb0a","repo":"ytdl-org/youtube-dl","slug":"unable-to-load-data-error-code-s","errorCode":null,"errorMessage":"Unable to load data. Error code: %s","messagePattern":"Unable to load data\\. Error code: (.+?)","errorType":"exception","errorClass":"ExtractorError","httpStatus":null,"severity":"error","filePath":"youtube_dl/extractor/iqiyi.py","lineNumber":364,"sourceCode":"        tvid = self._search_regex(\n            r'data-(?:player|shareplattrigger)-tvid\\s*=\\s*[\\'\"](\\d+)', webpage, 'tvid', default=None)\n        if tvid is None:\n            playlist_result = self._extract_playlist(webpage)\n            if playlist_result:\n                return playlist_result\n            raise ExtractorError('Can\\'t find any video')\n\n        video_id = self._search_regex(\n            r'data-(?:player|shareplattrigger)-videoid\\s*=\\s*[\\'\"]([a-f\\d]+)', webpage, 'video_id')\n\n        formats = []\n        for _ in range(5):\n            raw_data = self.get_raw_data(tvid, video_id)\n\n            if raw_data['code'] != 'A00000':\n                if raw_data['code'] == 'A00111':\n                    self.raise_geo_restricted()\n                raise ExtractorError('Unable to load data. Error code: ' + raw_data['code'])\n\n            data = raw_data['data']\n\n            for stream in data['vidl']:\n                if 'm3utx' not in stream:\n                    continue\n                vd = compat_str(stream['vd'])\n                formats.append({\n                    'url': stream['m3utx'],\n                    'format_id': vd,\n                    'ext': 'mp4',\n                    'preference': self._FORMATS_MAP.get(vd, -1),\n                    'protocol': 'm3u8_native',\n                })\n\n            if formats:\n                break\n","sourceCodeStart":346,"sourceCodeEnd":382,"githubUrl":"https://github.com/ytdl-org/youtube-dl/blob/956b8c585591b401a543e409accb163eeaaa1193/youtube_dl/extractor/iqiyi.py#L346-L382","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Look up the reported code: A00103/A00113-style codes usually mean VIP content or expired tickets.","Verify the video is free to watch in a browser from your region.","Update youtube-dl/yt-dlp - signature algorithm changes produce non-A00000 codes en masse.","Retry after some minutes for transient API failures."],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"try:\n    ydl.extract_info(url)\nexcept ExtractorError as e:\n    if str(e).startswith('Unable to load data. Error code: A001'):\n        # geo/VIP family: check code, either reroute region or mark VIP-only\n        classify_iqiyi_code(str(e))\n    else:\n        retry_with_backoff(url, attempts=3)","preventionTips":["Map iQiyi A-codes (A00111 geo, VIP codes) in your pipeline to distinct handling.","Check that content is free-tier in the target region before queueing.","Retry transient non-A00000 codes once with backoff; treat VIP codes as permanent."],"tags":["api","extractor","iqiyi","vip-content","geo-restriction","error-code"],"backgroundTag":null,"analyzedSha":"956b8c585591b401a543e409accb163eeaaa1193","analyzedAt":"2026-08-14T18:59:47.863Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}