in reply to Mimicking Internet Explorer (IE) via LWP or Mechanize?

Ok for posterity I need to indicate how I goofed. The information was there. The right google key would have been NOT emulation or mimick or etc ... rather agent_alias.

What I was looking for was:

$mech->agent_alias( $alias )

Sets the user agent string to the expanded version from a table of actual user strings. $alias can be one of the following:

* Windows IE 6

* Windows Mozilla

* Mac Safari

* Mac Mozilla

* Linux Mozilla

* Linux Konqueror

then it will be replaced with a more interesting one. For instance,

$mech->agent_alias( 'Windows IE 6' );

sets your User-Agent to:

Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)

The list of valid aliases can be returned from known_agent_aliases(). The current list is:

* Windows IE 6

* Windows Mozilla

* Mac Safari

* Mac Mozilla

* Linux Mozilla

* Linux Konqueror

I guess I didn't have my wheaties the first time through the pod. 8-P

  • Comment on Re: Mimicking Internet Explorer (IE) via LWP or Mechanize?