]>
Commit | Line | Data |
---|---|---|
1 | from .common import InfoExtractor | |
2 | from ..utils import ( | |
3 | ExtractorError, | |
4 | urlencode_postdata, | |
5 | ) | |
6 | ||
7 | ||
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)) | |
14 | ||
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 |