Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
@@ -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)
++++++++++++++++++

Expand Down
14 changes: 4 additions & 10 deletions pygodaddy/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down