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?

Path csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!rt.uk.eu.org!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <python-python-list@m.gmane.org>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.012
X-Spam-Evidence '*H*': 0.98; '*S*': 0.00; 'source,': 0.04; '(python': 0.07; 'subject:same': 0.07; 'assuming': 0.09; 'classes.': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'true)': 0.09; 'subject:How': 0.10; 'inputs': 0.16; 'received:80.91.229.3': 0.16; 'received:dip0.t-ipconnect.de': 0.16; 'received:plane.gmane.org': 0.16; 'received:t-ipconnect.de': 0.16; 'wrote:': 0.18; 'library': 0.18; 'translated': 0.19; 'seems': 0.21; 'this?': 0.23; 'header :User-Agent:1': 0.23; 'refers': 0.24; 'suggested': 0.26; 'values': 0.27; 'header:X-Complaints-To:1': 0.27; "doesn't": 0.30; "i'm": 0.30; 'lies': 0.31; 'ones.': 0.31; 'workaround': 0.31; 'another': 0.32; 'guess': 0.33; 'maybe': 0.34; 'subject:the': 0.34; 'problem': 0.35; 'subject:with': 0.35; 'common': 0.35; 'but': 0.35; 'belong': 0.36; 'skip:\xd0 10': 0.36; 'subject:?': 0.36; 'url:org': 0.36; 'should': 0.36; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'how': 0.40; 'read': 0.60; 'manually': 0.60; 'most': 0.60; 'field.': 0.61; 'took': 0.61; 'email addr:gmail.com': 0.63; 'name': 0.63; 'real': 0.63; 'choose': 0.64; 'grab': 0.64; 'interest': 0.64; 'different': 0.65; '8bit%:100': 0.72; '(probably': 0.84; 'otten': 0.84; 'notion': 0.91; '2013': 0.98
X-Injected-Via-Gmane http://gmane.org/
To python-list@python.org
From Peter Otten <__peter__@web.de>
Subject Re: How to tick checkboxes with the same name?
Date Fri, 26 Jul 2013 09:05:15 +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>
Mime-Version 1.0
Content-Type text/plain; charset="UTF-8"
Content-Transfer-Encoding 8Bit
X-Gmane-NNTP-Posting-Host p5084a063.dip0.t-ipconnect.de
User-Agent KNode/4.7.3
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.5136.1374822335.3114.python-list@python.org> (permalink)
Lines 25
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1374822335 news.xs4all.nl 15863 [2001:888:2000:d::a6]:57009
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:51288

Show key headers only | 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