Package org.archive.modules.forms
Class HTMLForm
java.lang.Object
org.archive.modules.forms.HTMLForm
Simple representation of a discovered HTML Form.
- Author:
- gojomo
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected String
protected List<HTMLForm.FormInput>
protected List<HTMLForm.FormInput>
protected List<HTMLForm.FormInput>
protected String
protected String
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Add a discovered INPUT, tracking it as potential username/password receiver.void
Add a discovered INPUT, tracking it as potential username/password receiver.Provide abbreviated annotation, of the form...boolean
protected HTMLForm.FormInput
boolean
For now, we consider a POST form with only 1 password field and 1 potential username field (type text or email) to be a likely login form.void
void
setEnctype
(String enctype) void
toString()
-
Field Details
-
method
-
action
-
enctype
-
allInputs
-
candidateUsernameInputs
-
candidatePasswordInputs
-
-
Constructor Details
-
HTMLForm
public HTMLForm()
-
-
Method Details
-
addField
Add a discovered INPUT, tracking it as potential username/password receiver.- Parameters:
type
-name
-value
-checked
- true if "checked" attribute is present (for radio buttons and checkboxes)
-
isMultipleFormSubmitInputs
-
addField
Add a discovered INPUT, tracking it as potential username/password receiver.- Parameters:
type
-name
-value
-
-
setMethod
-
getAction
-
setAction
-
getEnctype
-
setEnctype
-
seemsLoginForm
public boolean seemsLoginForm()For now, we consider a POST form with only 1 password field and 1 potential username field (type text or email) to be a likely login form.- Returns:
- boolean likely login form
-
presumedUsernameInput
-
formData
-
toString
-
asAnnotation
Provide abbreviated annotation, of the form... "form:Phhpt" ...where the first capital letter indicates submission type, G[ET] or P[OST], and following lowercase letters types of inputs in order, by their first letter.- Returns:
- String suitable for brief crawl.log annotation
-