From 9f9ade0d45f0159ff203087079bc8167ad9dfd7f Mon Sep 17 00:00:00 2001 From: GamaC0de Date: Tue, 22 Mar 2016 13:56:51 +0200 Subject: [misc] revert https://github.com/pyload/pyload/commit/e5b69006811275b28a282c053ad3e851e4a13cab --- module/plugins/internal/misc.py | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'module') diff --git a/module/plugins/internal/misc.py b/module/plugins/internal/misc.py index 911359548..e2ab775de 100644 --- a/module/plugins/internal/misc.py +++ b/module/plugins/internal/misc.py @@ -38,7 +38,7 @@ except ImportError: class misc(object): __name__ = "misc" __type__ = "plugin" - __version__ = "0.31" + __version__ = "0.32" __status__ = "stable" __pattern__ = r'^unmatchable$' @@ -755,17 +755,14 @@ def parse_html_form(attr_str, html, input_names={}): for inputtag in re.finditer(r'(<(input|textarea|button).*?>)([^<]*(?=', re.I | re.S), "", form.group('CONTENT')), re.I | re.S): + name = parse_html_tag_attr_value("name", inputtag.group(1)) if name: - if inputtag.group(2).lower() == "button": - if parse_html_tag_attr_value("type", inputtag.group(1)).lower() == "submit": - inputs[name] = "" + value = parse_html_tag_attr_value("value", inputtag.group(1)) + if not value: + inputs[name] = inputtag.group(3) or "" else: - value = parse_html_tag_attr_value("value", inputtag.group(1)) - if not value: - inputs[name] = inputtag.group(3) or "" - else: - inputs[name] = value + inputs[name] = value if not input_names: #: No attribute check -- cgit v1.2.3