{"record":{"id":"47711b0b73715eb4","repo":"ytdl-org/youtube-dl","slug":"error-47711b","errorCode":null,"errorMessage":"error","messagePattern":"error","errorType":"exception","errorClass":"ExtractorError","httpStatus":null,"severity":"error","filePath":"youtube_dl/extractor/funimation.py","lineNumber":75,"sourceCode":"        'only_matching': True,\n    }]\n\n    def _login(self):\n        username, password = self._get_login_info()\n        if username is None:\n            return\n        try:\n            data = self._download_json(\n                'https://prod-api-funimationnow.dadcdigital.com/api/auth/login/',\n                None, 'Logging in', data=urlencode_postdata({\n                    'username': username,\n                    'password': password,\n                }))\n            self._TOKEN = data['token']\n        except ExtractorError as e:\n            if isinstance(e.cause, compat_HTTPError) and e.cause.code == 401:\n                error = self._parse_json(e.cause.read().decode(), None)['error']\n                raise ExtractorError(error, expected=True)\n            raise\n\n    def _real_initialize(self):\n        self._login()\n\n    def _real_extract(self, url):\n        display_id = self._match_id(url)\n        webpage = self._download_webpage(url, display_id)\n\n        def _search_kane(name):\n            return self._search_regex(\n                r\"KANE_customdimensions\\.%s\\s*=\\s*'([^']+)';\" % name,\n                webpage, name, default=None)\n\n        title_data = self._parse_json(self._search_regex(\n            r'TITLE_DATA\\s*=\\s*({[^}]+})',\n            webpage, 'title data', default=''),\n            display_id, js_to_json, fatal=False) or {}","sourceCodeStart":57,"sourceCodeEnd":93,"githubUrl":"https://github.com/ytdl-org/youtube-dl/blob/956b8c585591b401a543e409accb163eeaaa1193/youtube_dl/extractor/funimation.py#L57-L93","documentation":"Raised by FunimationNow's _login when the auth API (prod-api-funimationnow.dadcdigital.com/api/auth/login/) returns HTTP 401 and the body's 'error' field is surfaced verbatim as an expected error. A 401 on this endpoint means the credentials were rejected (or the account lacks access); the token assignment never happens.","triggerScenarios":"_download_json of the login endpoint with username/password raises ExtractorError with a compat_HTTPError cause of code 401; the JSON body's 'error' string is re-raised. Triggered by wrong --username/--password, a locked account, or Funimation auth changes after the service's Sony/Crunchyroll migration.","commonSituations":"Stored credentials going stale after Funization's shutdown/migration to Crunchyroll; typos in netrc files; free accounts trying to reach subscriber content.","solutions":["Confirm credentials work at funimation.com (or note the service migration — content moved to Crunchyroll, so use that extractor where applicable)","Update to yt-dlp: the Funimation auth flow changed near end-of-life and youtube-dl is frozen","Use --cookies from a logged-in browser session instead of password auth","Verify the subscription tier includes the requested show/region"],"exampleFix":"# before\nyoutube_dl --username me@example.com --password bad 'https://www.funimation.com/en/shows/x/'\n# ERROR: Invalid credentials\n\n# after\nyt-dlp --cookies funi_cookies.txt 'https://www.funimation.com/en/shows/x/'","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try:\n    ydl.extract_info(url)\nexcept ExtractorError as e:\n    if caused_by_401(e):  # login rejected\n        stop_retrying(url)  # wrong credentials; fix auth, no point retrying","preventionTips":["Verify credentials in a browser before wiring them into CLI options","Prefer --cookies over password auth for Funimation; the service was migrated to Crunchyroll — plan accordingly"],"tags":["funimation","extractor","authentication","login-failed"],"backgroundTag":null,"analyzedSha":"956b8c585591b401a543e409accb163eeaaa1193","analyzedAt":"2026-08-14T18:59:47.863Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}