Hello, is there a way to add JavaScript support to mechanize so that it will handle simple redirection like "document.location.href="? TIA
A:
To support that, you'd only need to extract the href parameter ( using a regex maybe ) and then do :
mech.get(href_param)
As far as I know mechanize
supports relative URL's.
If javascript's a must, then I would suggest firewatir. It can automate firefox, and this way you get a free javascript interpreter.
Geo
2009-08-10 15:23:52
but what if redirection is conditional?
roddik
2009-08-10 15:36:24