Python
23 Oct 2011
 
 
 
1
2
3
4
5
6
7
8
9
def login(self, account):
self.grab.go('http://www.tumblr.com/login')
self.grab.choose_form(1)
self.grab.set_input('email', account.email)
self.grab.set_input('password', account.password)
self.grab.submit()
if not self.grab.search(u'Create a new blog'):
raise AuthError