]> Raphaƫl G. Git Repositories - youtubedl/blob - youtube_dl/extractor/gigya.py
debian/patches/remove-autoupdate-mechanism.patch: Remove fewer things to avoid future...
[youtubedl] / youtube_dl / extractor / gigya.py
1 from __future__ import unicode_literals
2
3 from .common import InfoExtractor
4
5 from ..utils import (
6 ExtractorError,
7 urlencode_postdata,
8 )
9
10
11 class 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