member ['mercury', 'may']
member ['taylor', 'deacon']
As seen, 2 robobrowser.forms.fields.Checkbox instances were created, with the same name, options different. I thought it would be one instance, with 4 options.
def _group_flat_tags(tag, tags):
"""Extract tags sharing the same name as the provided tag. Used to collect
options for radio and checkbox inputs.
:param Tag tag: BeautifulSoup tag
:param list tags: List of tags
:return: List of matching tags
"""
grouped = [tag]
name = tag.get('name', '').lower()
while tags and tags[0].get('name', '').lower() == name: # <---- HERE
grouped.append(tags.pop(0))
return grouped
I found that checkboxes with same name will not be grouped if some other inputs exists between them.
which output
As seen, 2 robobrowser.forms.fields.Checkbox instances were created, with the same name, options different. I thought it would be one instance, with 4 options.
Maybe it's a bug? I have no idea.
relevant code