Factory for forms, links, etc.
This interface may expand in future.
Public methods:
set_request_class(request_class) set_response(response) forms() links()
Public attributes:
encoding: string specifying the encoding of response if it contains a text document (this value is left unspecified for documents that do not have an encoding, e.g. an image file) is_html: true if response contains an HTML document (XHTML may be regarded as HTML too) title: page title, or None if no title or not HTML
There are no base classes.
There are no implemented interfaces.
There are no attributes in this class.
forms()
Return iterable over ClientForm.HTMLForm-like objects.
links()
Return iterable over mechanize.Link-like objects.
set_request_class(request_class)
Set urllib2.Request class.
ClientForm.HTMLForm instances returned by .forms() will return instances of this class when .click()ed.
set_response(response)
Set response.
The response must implement the same interface as objects returned by urllib2.urlopen().