Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #br.select_form(nr=1)
- url = "http://www.sacbee.com/statepay/#req=employee%2Ftop%2Fyear%3D2013"
- br = mechanize.Browser()
- br.set_handle_robots(False) # ignore robots
- br.open(url)
- for form in br.forms():
- print "Form name:", form.name
- print form
- br.select_form(nr=1)
- form = br.form
- br["name"] = "Fligstein"
- form['carrier'] = ["2012"]
- res = br.submit()
- content = res.read()
- dom = web.Element(content)
- for i in dom.by_tag('a'):
- print i
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement