useragent – HTTP user-agent Spoofing

class lib.browser.plugins.useragent.UserAgentSpoofer(agent_string)

Allows one to easily change the browser’s HTTP user-agent header. This can be handy if you want to ensure that we are treated like a real-world browser.


Creates a new instance of the plugin using the specified user-agent string. The string can be custom, or can be pulled from one of the class’ example strings.


A dictionary containing user-agent strings for iceweasel-linux-5.0, firefox-macintosh-5.0, and firefox-windows-4.0.

Previous topic cookies – Automatic Handling of Browser Cookies

Next topic keepalive – Handler for HTTP Keep-Alive Headers

This Page