yt-dlp/yt-dlp · error · ExtractorError
Unable to log in
Error message
Unable to log in
What it means
Error "Unable to log in" thrown in yt-dlp/yt-dlp.
Source
Thrown at yt_dlp/extractor/pornhub.py:132
f'https://www.{host}/front/authenticate', None,
f'Logging in to {site}',
data=urlencode_postdata(login_form),
headers={
'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
'Referer': login_url,
'X-Requested-With': 'XMLHttpRequest',
}, impersonate=True)
if response.get('success') == '1':
self._logged_in = True
return
message = response.get('message')
if message is not None:
raise ExtractorError(
f'Unable to login: {message}', expected=True)
raise ExtractorError('Unable to log in')
class PornHubIE(PornHubBaseIE):
IE_DESC = 'PornHub and Thumbzilla'
_VALID_URL = rf'''(?x)
https?://
(?:
(?:[a-zA-Z0-9.-]+\.)?
{PornHubBaseIE._PORNHUB_HOST_RE}
/(?:(?:view_video\.php|video/show)\?viewkey=|embed/)|
(?:www\.)?thumbzilla\.com/video/
)
(?P<id>[\da-z]+)
'''
_EMBED_REGEX = [r'<iframe[^>]+?src=["\'](?P<url>(?:https?:)?//(?:www\.)?pornhub(?:premium)?\.(?:com|net|org)/embed/[\da-z]+)']
_TESTS = [{
'url': 'http://www.pornhub.com/view_video.php?viewkey=648719015',
'md5': '4d4a4e9178b655776f86cf89ecaf0edf',View on GitHub (pinned to 81ecd58b13)
Solutions
- Verify your login credentials
- Use --cookies-from-browser with a logged-in session
When it happens
Trigger: Thrown at yt_dlp/extractor/pornhub.py:132 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of yt-dlp/yt-dlp@81ecd58b13 (2026-08-22).
Data as JSON: /api/errors/4dc4bed4ea0ababb.
Report an issue: GitHub.