POST value related question

J

james27

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]
br.form['contents.contentsValue'] = 'hello'
br.submit()
..
..

if anyone who know please help me .
thanks in advance.
 
D

Diez B. Roggisch

james27 said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,567
Members
45,042
Latest member
icassiem

Latest Threads

Top