@staticmethod
def _hidden_inputs(html):
    html = re.sub('<!--(?:(?!<!--).)*-->', '', html)
    hidden_inputs = {}
    for input in re.findall('(?i)(<input[^>]+>)', html):
        attrs = extract_attributes(input)
        if (not input):
            continue
        if (attrs.get('type') not in ('hidden', 'submit')):
            continue
        name = (attrs.get('name') or attrs.get('id'))
        value = attrs.get('value')
        if (name and (value is not None)):
            hidden_inputs[name] = value
    return hidden_inputs
@staticmethod
def _hidden_inputs(html):
    html = re.sub('<!--(?:(?!<!--).)*-->', , html)
    hidden_inputs = {}
    for input in re.findall('(?i)(<input[^>]+>)', html):
        attrs = extract_attributes(input)
        if (not input):
            continue
        if (attrs.get('type') not in ('hidden', 'submit')):
            continue
        name = (attrs.get('name') or attrs.get('id'))
        value = attrs.get('value')
        if (name and (value is not None)):
            hidden_inputs[name] = value
    return hidden_inputs