class documentation

class FormElement(HtmlElement):

View In Hierarchy

Represents a <form> element.
Method action.deleter Undocumented
Method action.setter Undocumented
Method fields.setter Undocumented
Method form​_values Return a list of tuples of the field values for the form. This is suitable to be passed to urllib.urlencode().
Method method.setter Undocumented
Property action Get/set the form's action attribute.
Property fields Dictionary-like object that represents all the fields in this form. You can set values in this dictionary to effect the form.
Property inputs Returns an accessor for all the input elements in the form.
Property method Get/set the form's method. Always returns a capitalized string, and defaults to 'GET'
Method ​_name Undocumented

Inherited from HtmlMixin (via HtmlElement):

Method classes.setter Undocumented
Method cssselect Run the CSS expression on this element and its children, returning a list of the results.
Method drop​_tag Remove the tag, but not its children or text. The children and text are merged into the parent.
Method drop​_tree Removes this element from the tree, including its children and text. The tail text is joined to the previous element or parent.
Method find​_class Find any elements with the given class name.
Method find​_rel​_links Find any links like <a rel="{rel}">...</a>; returns a list of elements.
Method get​_element​_by​_id Get the first element in a document with the given id. If none is found, return the default argument if provided or raise KeyError otherwise.
Method iterlinks No summary
Method label.deleter Undocumented
Method label.setter Undocumented
Method make​_links​_absolute No summary
Method resolve​_base​_href Find any <base href> tag in the document, and apply its values to all links found in the document. Also remove the tag once it has been applied.
Method rewrite​_links Rewrite all the links in the document. For each link link_repl_func(link) will be called, and the return value will replace the old link.
Method set set(self, key, value=None)
Method text​_content Return the text content of the tag (and the text in any children).
Property base​_url Returns the base URL, given when the page was parsed.
Property body Return the <body> element. Can be called from a child element to get the document's head.
Property classes A set-like wrapper around the 'class' attribute.
Property forms Return a list of all the forms
Property head Returns the <head> element. Can be called from a child element to get the document's head.
Property label Get or set any <label> element associated with this element.
@action.deleter
def action(self):

Undocumented

@action.setter
def action(self, value):

Undocumented

@fields.setter
def fields(self, value):

Undocumented

def form_values(self):
Return a list of tuples of the field values for the form. This is suitable to be passed to urllib.urlencode().
@method.setter
def method(self, value):

Undocumented

@property
action =
Get/set the form's action attribute.
@property
fields =
Dictionary-like object that represents all the fields in this form. You can set values in this dictionary to effect the form.
@property
inputs =

Returns an accessor for all the input elements in the form.

See InputGetter for more information about the object.

@property
method =
Get/set the form's method. Always returns a capitalized string, and defaults to 'GET'
def _name(self):

Undocumented