diff --git a/HISTORY.rst b/HISTORY.rst index 62a599a..87443de 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -1,3 +1,8 @@ +0.2.3 (2015-08-26) +++++++++++++++++++ + +* Fixed for GoDaddy's new auth method (thanks to @claneys and @BryceGough) + 0.2.0 (2015-03-11) ++++++++++++++++++ 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) diff --git a/setup.py b/setup.py index 6846804..ac1cbb7 100644 --- a/setup.py +++ b/setup.py @@ -23,7 +23,7 @@ setup( name='pygodaddy', - version = '0.2.2', + version = '0.2.3', description = '3rd Party Client Library for Manipulating Go Daddy DNS Records.', long_description=open('README.rst').read()+'\n\n'+open('HISTORY.rst').read(), url = 'https://github.com/observerss/pygodaddy',