POST value related question

Diez B. Roggisch deets at nospam.web.de
Mon Oct 12 12:03:24 EDT 2009


james27 wrote:

> 
> hello
> im using mechanize .
> i want to send some post value by use mechanize.
> but problem is one of POST value in html source is
> looks like below.
> 
> post.category.categoryNo=[*1]
> 
> anyway so i was tried several method but all failed.
> 
> here is source .
> .
> .
> br = mechanize.browser()
> br.select_form(nr=0)
> br.form['post.category.categoryNo']=[*1]

You are missing quotes here.

  br.form['post.category.categoryNo']="[*1]"

> br.form['contents.contentsValue'] = 'hello'
> br.submit()

HTH, Diez



More information about the Python-list mailing list