Class
mechanize._useragent.UserAgent

Convenient user-agent class.

Do not use .add_handler() to add a handler for something already dealt with by this code.

Public attributes:

addheaders: list of (name, value) pairs specifying headers to send with every request, unless they are overridden in the Request instance.

>>> ua = UserAgent() >>> ua.addheaders = [ ... ("User-agent", "Mozilla/5.0 (compatible)"), ... ("From", "responsible.person@example.com")]

Base classes

Implemented Interfaces

There are no implemented interfaces.

Attributes/Properties

Methods

Known Subclasses