I am REALLY confused. I am basically trying to fill out a form on a website using mechanization for python. I have everything to work except the dropdown menu. What do I use to select it and what do I set for the value? I do not know if I should indicate the name of the choice or its numerical value. Help would be greatly appreciated, thanks.
Code snippet:
try: br.open("http://www.website.com/") try: br.select_form(nr=0) br['number'] = "mynumber" br['from'] = " herpderp@gmail.com " br['subject'] = "Yellow" br['carrier'] = "203" br['message'] = "Hello, World!" response = br.submit() except: pass except: print "Couldn't connect!" quit
I am having problems with the carrier, which is a drop down menu.
source share