You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
677 B

  1. from __future__ import unicode_literals
  2. from .common import InfoExtractor
  3. from ..utils import (
  4. ExtractorError,
  5. urlencode_postdata,
  6. )
  7. class GigyaBaseIE(InfoExtractor):
  8. def _gigya_login(self, auth_data):
  9. auth_info = self._download_json(
  10. 'https://accounts.eu1.gigya.com/accounts.login', None,
  11. note='Logging in', errnote='Unable to log in',
  12. data=urlencode_postdata(auth_data))
  13. error_message = auth_info.get('errorDetails') or auth_info.get('errorMessage')
  14. if error_message:
  15. raise ExtractorError(
  16. 'Unable to login: %s' % error_message, expected=True)
  17. return auth_info