Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #51288

Re: How to tick checkboxes with the same name?

From Peter Otten <__peter__@web.de>
Subject Re: How to tick checkboxes with the same name?
Date 2013-07-26 09:05 +0200
Organization None
References <8fad5326-8518-4554-91bf-1c0b5c97d9bc@googlegroups.com> <mailman.4995.1374564292.3114.python-list@python.org> <85c5f224-3ccc-421b-bb5d-d54c3defbd27@googlegroups.com>
Newsgroups comp.lang.python
Message-ID <mailman.5136.1374822335.3114.python-list@python.org> (permalink)

Show all headers | View raw


malayrev@gmail.com wrote:

> вторник, 23 июля 2013 г., 11:25:00 UTC+4 пользователь Peter Otten написал:
>> malayrev@gmail.com wrote:

>> For all but the most popular projects a url works wonders. I'm assuming

>> http://grablib.org

> Well, I have read the documentation, I guess the problem lies in somewhat
> different field. As long as I understand it refers to Checkboxgroup
> classes. As checkboxes of interest belong to some common group with the
> common name "a", they do have values different from "True" or "False"
> (probably a sequence?) and I should guess somehow what are the real ones.
> How to do this?

I took a quick look into the source, and it seems that grab has no notion of 
multiple inputs with the same name. My suggested workaround 

>> set_input_by_id(_"a1", True)

doesn't work because (among other things) the id is immediately translated 
into the name. I fear you have to construct the request manually or choose 
another library -- maybe mechanize (Python 2 only)?

Back to comp.lang.python | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

How to tick checkboxes with the same name? malayrev@gmail.com - 2013-07-22 21:10 -0700
  Re: How to tick checkboxes with the same name? Joel Goldstick <joel.goldstick@gmail.com> - 2013-07-23 01:05 -0400
    Re: How to tick checkboxes with the same name? malayrev@gmail.com - 2013-07-25 08:42 -0700
  Re: How to tick checkboxes with the same name? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-07-23 05:14 +0000
  Re: How to tick checkboxes with the same name? Peter Otten <__peter__@web.de> - 2013-07-23 09:25 +0200
    Re: How to tick checkboxes with the same name? malayrev@gmail.com - 2013-07-25 08:46 -0700
      Re: How to tick checkboxes with the same name? Peter Otten <__peter__@web.de> - 2013-07-26 09:05 +0200

csiph-web