{"record":{"id":"8297e9ce722be05e","repo":"ytdl-org/youtube-dl","slug":"bigo-says-s-code-s","errorCode":null,"errorMessage":"Bigo says: %s (code %s)","messagePattern":"Bigo says: (.+?) \\(code (.+?)\\)","errorType":"exception","errorClass":"ExtractorError","httpStatus":null,"severity":"error","filePath":"youtube_dl/extractor/bigo.py","lineNumber":40,"sourceCode":"    }, {\n        'url': 'https://www.bigo.tv/th/Tarlerm1304',\n        'only_matching': True,\n    }, {\n        'url': 'https://bigo.tv/115976881',\n        'only_matching': True,\n    }]\n\n    def _real_extract(self, url):\n        user_id = self._match_id(url)\n\n        info_raw = self._download_json(\n            'https://bigo.tv/studio/getInternalStudioInfo',\n            user_id, data=urlencode_postdata({'siteId': user_id}))\n\n        if not isinstance(info_raw, dict):\n            raise ExtractorError('Received invalid JSON data')\n        if info_raw.get('code'):\n            raise ExtractorError(\n                'Bigo says: %s (code %s)' % (info_raw.get('msg'), info_raw.get('code')), expected=True)\n        info = info_raw.get('data') or {}\n\n        if not info.get('alive'):\n            raise ExtractorError('This user is offline.', expected=True)\n\n        return {\n            'id': info.get('roomId') or user_id,\n            'title': info.get('roomTopic') or info.get('nick_name') or user_id,\n            'formats': [{\n                'url': info.get('hls_src'),\n                'ext': 'mp4',\n                'protocol': 'm3u8',\n            }],\n            'thumbnail': info.get('snapshot'),\n            'uploader': info.get('nick_name'),\n            'uploader_id': user_id,\n            'is_live': True,","sourceCodeStart":22,"sourceCodeEnd":58,"githubUrl":"https://github.com/ytdl-org/youtube-dl/blob/956b8c585591b401a543e409accb163eeaaa1193/youtube_dl/extractor/bigo.py#L22-L58","documentation":"Raised by BigoIE._real_extract when the studio-info JSON is a dict but its 'code' field is truthy — Bigo's own error envelope. The message interpolates the API's 'msg' and 'code' fields verbatim (e.g. 'Bigo says: user not exist (code 1001)'). Marked expected=True, i.e. a legitimate server-side rejection, commonly unknown users or invalid siteIds.","triggerScenarios":"POSTing siteId=<user_id> to getInternalStudioInfo where the id does not exist, the account was banned/deleted, or the API rejects the request for another server-side reason and returns {'code': <nonzero>, 'msg': <reason>} with no 'data' payload.","commonSituations":"Typo'd or stale Bigo user id from an old link; streamer deleted their account; URL matched the _VALID_URL pattern but the numeric id is malformed; API code semantics changed so previously valid ids now fail.","solutions":["Open https://bigo.tv/<user_id> in a browser to confirm the channel still exists.","Match the (code, msg) pair against Bigo's response — 'user not exist'-style messages mean the id is wrong/dead; pick the id from the channel page URL.","If the channel exists but every id fails, the endpoint or its parameters changed; inspect the site's network calls and update the POST in bigo.py:40.","Treat as expected in callers and surface the API msg to the user."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try:\n    ydl.extract_info('https://bigo.tv/%s' % user_id)\nexcept ExtractorError as e:\n    m = re.search(r'Bigo says: (.*?) \\(code (\\S+)\\)', str(e))\n    if m:\n        handle_bigo_api_error(user_id, m.group(1), m.group(2))  # expected; classify by code\n    else:\n        raise","preventionTips":["Verify the channel exists by loading https://bigo.tv/<id> in a browser before batch runs.","Treat 'user not exist' codes as permanent and prune the id from watch lists.","Log (msg, code) pairs — Bigo's envelope is stable even when messages localize."],"tags":["bigo","api-error","server-rejection","extractor","expected"],"backgroundTag":null,"analyzedSha":"956b8c585591b401a543e409accb163eeaaa1193","analyzedAt":"2026-08-14T18:59:47.863Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}