{"record":{"id":"de7c81513846e57b","repo":"ytdl-org/youtube-dl","slug":"s-said-s-de7c81","errorCode":null,"errorMessage":"%s said: %s","messagePattern":"%s said: %s","errorType":"exception","errorClass":"ExtractorError","httpStatus":406,"severity":"error","filePath":"youtube_dl/extractor/hrti.py","lineNumber":91,"sourceCode":"\n        auth_data = {\n            'username': username,\n            'password': password,\n        }\n\n        try:\n            auth_info = self._download_json(\n                self._login_url, None, note='Logging in', errnote='Unable to log in',\n                data=json.dumps(auth_data).encode('utf-8'))\n        except ExtractorError as e:\n            if isinstance(e.cause, compat_HTTPError) and e.cause.code == 406:\n                auth_info = self._parse_json(e.cause.read().encode('utf-8'), None)\n            else:\n                raise\n\n        error_message = auth_info.get('error', {}).get('message')\n        if error_message:\n            raise ExtractorError(\n                '%s said: %s' % (self.IE_NAME, error_message),\n                expected=True)\n\n        self._token = auth_info['secure_streaming_token']\n\n    def _real_initialize(self):\n        self._initialize_api()\n        self._login()\n\n\nclass HRTiIE(HRTiBaseIE):\n    _VALID_URL = r'''(?x)\n                        (?:\n                            hrti:(?P<short_id>[0-9]+)|\n                            https?://\n                                hrti\\.hrt\\.hr/(?:\\#/)?video/show/(?P<id>[0-9]+)/(?P<display_id>[^/]+)?\n                        )\n                    '''","sourceCodeStart":73,"sourceCodeEnd":109,"githubUrl":"https://github.com/ytdl-org/youtube-dl/blob/956b8c585591b401a543e409accb163eeaaa1193/youtube_dl/extractor/hrti.py#L73-L109","documentation":"Raised by the HRTi (Croatian Radiotelevision) extractor during _login when the authentication endpoint response contains an error.message field. The message from HRTi's auth API (e.g. invalid credentials, expired token) is forwarded verbatim prefixed with the extractor name.","triggerScenarios":"Calling an HRTi URL that triggers _real_initialize -> _login, where the POST to self._login_url returns a JSON body with a non-empty 'error'.'message' (bad username/password, or device authorization failure).","commonSituations":"Wrong or expired HRTi credentials supplied via netrc/CLI, password changes on the account, or API-side changes in HRTi's login flow.","solutions":["Check the HRTi username/password used for authentication (netrc or --username/--password).","Confirm the account still works by logging in on the HRTi website.","Update youtube-dl/yt-dlp in case the login API contract changed."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try:\n    ydl.extract_info(hrti_url)\nexcept ExtractorError as e:\n    if str(e).startswith('hrti said:'):\n        # auth-side rejection: verify credentials, then give up for this run\n        raise AuthRejected(str(e))","preventionTips":["Store HRTi credentials in netrc instead of CLI to avoid truncation issues.","Test credentials on the HRTi site before batch runs.","Distinguish login errors from extraction errors by the 'IE said:' prefix."],"tags":["authentication","api","extractor","hrti","login"],"backgroundTag":null,"analyzedSha":"956b8c585591b401a543e409accb163eeaaa1193","analyzedAt":"2026-08-14T18:59:47.863Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}