From 9bfd1ffc082872947442c97471934f90053bb123 Mon Sep 17 00:00:00 2001 From: Forlot Romain Date: Wed, 26 Aug 2015 09:56:09 +0200 Subject: [PATCH] Fix : New godaddy auth method. Simpler. Login method doesn't work anymore since 24/08/2015. This fix the problem --- pygodaddy/client.py | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/pygodaddy/client.py b/pygodaddy/client.py index a7aaa3c..e4afc14 100644 --- a/pygodaddy/client.py +++ b/pygodaddy/client.py @@ -97,17 +97,11 @@ def login(self, username, password): :returns: `True` if login is successful, else `False` """ r = self.session.get(self.default_url) - try: - viewstate = re.compile(r'id="__VIEWSTATE" value="([^"]+)"').search(r.text).group(1) - except: - logger.exception('Login routine broken, godaddy may have updated their login mechanism') - return False data = { - 'Login$userEntryPanel2$LoginImageButton.x' : 0, - 'Login$userEntryPanel2$LoginImageButton.y' : 0, - 'Login$userEntryPanel2$UsernameTextBox' : username, - 'Login$userEntryPanel2$PasswordTextBox' : password, - '__VIEWSTATE': viewstate, + 'app' : 'idp', + 'realm' : 'idp', + 'name': username, + 'password' : password, } r = self.session.post(r.url, data=data) return self.is_loggedin(r.text)