Skip to content

Instantly share code, notes, and snippets.

@jaboutboul
Created August 30, 2012 21:11
Show Gist options
  • Save jaboutboul/3541129 to your computer and use it in GitHub Desktop.
Save jaboutboul/3541129 to your computer and use it in GitHub Desktop.
kivikfinder-mechanize
itemnum=message
br=mechanize.Browser()
br.open("http://www.ikea.com/us/en/catalog/stockcheck/") #open catalog
br.select_form(name="stocksearch") #select form
br.form['query']= itemnum #pass item number
br.form['ikeaStoreNumber1']= [local_settings.STORE_NUMBER]
br.submit() #submit form
html=br.response().read()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment