MorayJ has asked for the wisdom of the Perl Monks concerning the following question:
Hi
The UK government has changed its website and I'm trying to check up on links that I have to see if they still work on the new structure
I'm using LWP::Simple for this
If I put in the web address https://www.insolvencydirect.gov.uk/isolv, it very kindly returns http://www.bis.gov.uk/insolvency when I use $request->uri ($request being found with:
)my $browser = LWP::UserAgent->new; my $response = $browser->get( $url ); my $request = $response->request();
This is where the site now sends you if you go to that url
Difficulty is encountered with other links, like www.direct.gov.uk/en/Motoring/OwningAVehicle/TaxationClasses/DG_4022042 which takes you to https://www.gov.uk/vehicle-exempt-from-car-tax if you use a browser, but which $request->uri returns the original url I put in.
What are they doing differently? What do I need to do differently? I guess it's probably more of a web question that just about perl.
Thanks for any advice
MorayJ
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Using LWP::Simple to read a redirected page
by zentara (Cardinal) on Nov 13, 2012 at 20:12 UTC | |
by MorayJ (Beadle) on Nov 13, 2012 at 21:42 UTC | |
|
Re: Using LWP::Simple to read a redirected page
by Anonymous Monk on Nov 13, 2012 at 22:34 UTC | |
|
Re: Using LWP::Simple to read a redirected page
by Jukari (Initiate) on Nov 13, 2012 at 19:36 UTC | |
by MorayJ (Beadle) on Nov 13, 2012 at 21:47 UTC |