[ie/youtube] Fix `uploader_id` extraction (#11818)
[yt-dlp.git] / yt_dlp / extractor / gigya.py
blobcc18ee67c240cba055cdc4af9bf255f84bfb9d6f
1 from .common import InfoExtractor
2 from ..utils import (
3 ExtractorError,
4 urlencode_postdata,
8 class GigyaBaseIE(InfoExtractor):
9 def _gigya_login(self, auth_data):
10 auth_info = self._download_json(
11 'https://accounts.eu1.gigya.com/accounts.login', None,
12 note='Logging in', errnote='Unable to log in',
13 data=urlencode_postdata(auth_data))
15 error_message = auth_info.get('errorDetails') or auth_info.get('errorMessage')
16 if error_message:
17 raise ExtractorError(
18 f'Unable to login: {error_message}', expected=True)
19 return auth_info