You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

9 lines
259 B

  1. def get_form_fields(form):
  2. form_action = form.action
  3. data = dict()
  4. inputs = form.xpath("//input")
  5. for _input in inputs:
  6. name = _input.name
  7. if name is not None:
  8. data[name] = _input.value
  9. return form_action, data