]> jfr.im git - yt-dlp.git/blame - yt_dlp/extractor/gigya.py
Completely change project name to yt-dlp (#85)
[yt-dlp.git] / yt_dlp / extractor / gigya.py
CommitLineData
7913e0fc 1from __future__ import unicode_literals
2
3from .common import InfoExtractor
4
5from ..utils import (
6 ExtractorError,
7 urlencode_postdata,
8)
9
10
11class GigyaBaseIE(InfoExtractor):
12 def _gigya_login(self, auth_data):
13 auth_info = self._download_json(
14 'https://accounts.eu1.gigya.com/accounts.login', None,
15 note='Logging in', errnote='Unable to log in',
16 data=urlencode_postdata(auth_data))
17
18 error_message = auth_info.get('errorDetails') or auth_info.get('errorMessage')
19 if error_message:
20 raise ExtractorError(
21 'Unable to login: %s' % error_message, expected=True)
22 return auth_info