hi peter > I have written scrapers for a number of different sites, all of which require sign on, and have not had any problems with redirection not being performed. Hmm. Haven't done anything with sunrise yet (although I would like to automatically download my faxes from my sunrise onebox). i have made a script to sent SMS over their site (so i don't need to login myself and i can use my local address book instead of entering all addresses in their online address book) and it worked fine until a week ago, it stopped working and i don't see why.
> One of the best tips I've gotten from this list is to put "use > LWP::Debug qw(+); " in to your code. This turns on a trace so you can see what is happening. hey thanks! that helped a lot... now i see that mechanize get the first page GET http://mymobile.sunrise.ch/ and then gets redirected to GET http://mymobile.sunrise.ch/portal/res/member and then it gets a cookie extract_cookies: Set cookie JSESSIONID => ERXFXSMIMG5ZBQFIGZAXRA and it goes to the right URL GET http://mymobile.sunrise.ch/portal/res/guest;jsessionid=ERXFXSMIMG5ZBQFIGZAXRAQ?paf_dm=full&paf_gear_id=100001&?successURL=/portal/res/member%3Bjsessionid%3DERXFXSMIMG5ZBQFIGZAXRAQ but instead of stopping at the url it gets an additional URL GET http://mobile.sunrise.ch/atg_500 and this site shows me an error site of sunrise. if i enter the long URL in my browser i see the normal login page that i should see! > Have you looked at LWP::UserAgent::max_redirect()? By default (unless Mechanize changes this), it will only follow 7 redirects. By default it does not follow redirects in response to a post (which it is also not supposed to do, according to RFC). no it's definetly not the max_redirect, as it does to MUCH redirects ;-) > Hope this helps & please do let me know how you fix it! could you try a simple get on http://mymobile.sunrise.ch/ and see if you get the login-page instead of http://mobile.sunrise.ch/atg_500. perhaps i have a problem with my mechanize version (debian unstable) greets KoS btw.: i've just signed up for a /ch/open membership ;-) -- Martin Kos +41-76-384-93-33 http://kos.li Say NO to HTML in mail ICQ# 13556143 Proudly running Debian GNU/Linux