mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-24 15:50:32 +01:00
parent
464327acdb
commit
4a601c9eff
@ -45,10 +45,10 @@ def _perform_login(self, username, password):
|
|||||||
'x-acc-trace-id': str(uuid.uuid4()),
|
'x-acc-trace-id': str(uuid.uuid4()),
|
||||||
'x-clog-user-device-id': str(uuid.uuid4()),
|
'x-clog-user-device-id': str(uuid.uuid4()),
|
||||||
}
|
}
|
||||||
check_username = self._download_json(
|
valid_username = traverse_obj(self._download_json(
|
||||||
f'{self._ACCOUNT_API_BASE}/signup/email/status', None,
|
f'{self._ACCOUNT_API_BASE}/signup/email/status', None, note='Checking username',
|
||||||
note='Checking username', query={'email': username}, headers=headers)
|
query={'email': username}, headers=headers, expected_status=(400, 404)), 'hasPassword')
|
||||||
if not check_username.get('hasPassword'):
|
if not valid_username:
|
||||||
raise ExtractorError('Invalid username provided', expected=True)
|
raise ExtractorError('Invalid username provided', expected=True)
|
||||||
|
|
||||||
headers['content-type'] = 'application/json'
|
headers['content-type'] = 'application/json'
|
||||||
|
Loading…
Reference in New Issue
Block a user