posting to a form with no form name
scripteaze at gmail.com
scripteaze at gmail.com
Fri Nov 2 02:44:28 EDT 2007
posting to a form with no form name or it's just that i cant find the
form name.
can anyone explain how to either post to a form with no name or, find
the name of the form..here my current output, but i dont see a form
name, also, there is only 1 form on the page
<POST https://somesite.com/login.html application/x-www-form-
urlencoded
<TextControl(username=)>
<PasswordControl(password=)>
<SubmitControl(<None>=Secure Login) (readonly)>
<HiddenControl(dest=inbox.ws) (readonly)>>
class Crawler(object):
def __init__(self):
self._br = Browser()
self.html = ''
self.url = ''
self.loggedIn = False
def login(self):
self._br.set_handle_redirect(True)
cj = CookieJar()
self._br.set_cookiejar(cj)
self._br.open(somesite.com/login.ws)
for form in self._br.forms():
print form
self._br.select_form(' ') <----------- i cant seem to
find the form name
self._br['username'] = 'myid
self._br['password'] = 'mypass'
response=self._br.submit()
More information about the Python-list
mailing list