| [reply] |
The issue from the previous post was that WIN32:IE:Mechanize appears to not work correctly with frames. Google and perlmonk searches turned up questions back to 2005 but no real answers. So using WINE won't work
I guess I could use a sniffer/tracer as the other solutions suggest and hack out a solution but I figured this sort of problem must have come up before. If possible I wanted to save the few days of troubleshooting.
Is there any provisions in LWP or Mechanize for simulating a particular browser?
Or any ideas on the original post? - http://www.perlmonks.org/?node_id=854131
Or is RTF-packets is the only solution here
Thanks!
| [reply] |
| [reply] |
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
| [reply] |