{"record":{"id":"4dc4bed4ea0ababb","repo":"yt-dlp/yt-dlp","slug":"unable-to-log-in-4dc4be","errorCode":null,"errorMessage":"Unable to log in","messagePattern":"Unable to log in","errorType":"exception","errorClass":"ExtractorError","httpStatus":null,"severity":"error","filePath":"yt_dlp/extractor/pornhub.py","lineNumber":132,"sourceCode":"            f'https://www.{host}/front/authenticate', None,\n            f'Logging in to {site}',\n            data=urlencode_postdata(login_form),\n            headers={\n                'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',\n                'Referer': login_url,\n                'X-Requested-With': 'XMLHttpRequest',\n            }, impersonate=True)\n\n        if response.get('success') == '1':\n            self._logged_in = True\n            return\n\n        message = response.get('message')\n        if message is not None:\n            raise ExtractorError(\n                f'Unable to login: {message}', expected=True)\n\n        raise ExtractorError('Unable to log in')\n\n\nclass PornHubIE(PornHubBaseIE):\n    IE_DESC = 'PornHub and Thumbzilla'\n    _VALID_URL = rf'''(?x)\n                    https?://\n                        (?:\n                            (?:[a-zA-Z0-9.-]+\\.)?\n                            {PornHubBaseIE._PORNHUB_HOST_RE}\n                            /(?:(?:view_video\\.php|video/show)\\?viewkey=|embed/)|\n                            (?:www\\.)?thumbzilla\\.com/video/\n                        )\n                        (?P<id>[\\da-z]+)\n                    '''\n    _EMBED_REGEX = [r'<iframe[^>]+?src=[\"\\'](?P<url>(?:https?:)?//(?:www\\.)?pornhub(?:premium)?\\.(?:com|net|org)/embed/[\\da-z]+)']\n    _TESTS = [{\n        'url': 'http://www.pornhub.com/view_video.php?viewkey=648719015',\n        'md5': '4d4a4e9178b655776f86cf89ecaf0edf',","sourceCodeStart":114,"sourceCodeEnd":150,"githubUrl":"https://github.com/yt-dlp/yt-dlp/blob/81ecd58b1394793e6da9998cc19fdb45657f1685/yt_dlp/extractor/pornhub.py#L114-L150","documentation":"Error \"Unable to log in\" thrown in yt-dlp/yt-dlp.","triggerScenarios":"Thrown at yt_dlp/extractor/pornhub.py:132 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify your login credentials","Use --cookies-from-browser with a logged-in session"],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"81ecd58b1394793e6da9998cc19fdb45657f1685","analyzedAt":"2026-08-22T12:21:25.439Z","schemaVersion":2},"datasetVersion":"2026-08-22T14:17:55.899Z"}