POST value related question

Discussion in 'Python' started by james27, Oct 12, 2009.

  1. james27

    james27 Guest

    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.

    --
    View this message in context: http://www.nabble.com/POST-value-related-question-tp25857587p25857587.html
    Sent from the Python - python-list mailing list archive at Nabble.com.
     
    james27, Oct 12, 2009
    #1
    1. Advertising

  2. 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
     
    Diez B. Roggisch, Oct 12, 2009
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Maxwell Hammer
    Replies:
    7
    Views:
    657
    Peter Hansen
    Jun 18, 2005
  2. sanjay
    Replies:
    1
    Views:
    389
    sanjay
    Oct 9, 2008
  3. ken

    POST value related question

    ken, Oct 12, 2009, in forum: Python
    Replies:
    0
    Views:
    328
  4. ken

    POST value related question

    ken, Oct 13, 2009, in forum: Python
    Replies:
    0
    Views:
    266
  5. Wenjie

    perl CGI related: form post failure

    Wenjie, Sep 3, 2003, in forum: Perl Misc
    Replies:
    0
    Views:
    111
    Wenjie
    Sep 3, 2003
Loading...

Share This Page