cormanaz has asked for the wisdom of the Perl Monks concerning the following question:
But that just plays back the input URI.use strict; use feature ':5.10'; use LWP::UserAgent; my $uri = 'https://t.co/O4qjsxuCsV'; my $browser = new LWP::UserAgent(); $browser->max_redirect(5); $browser->agent("Mozilla/5.0 (Windows NT 6.1)"); my $response = $browser->get($uri); my $request = $response->request(); my @redirects = $response->redirects(); foreach my $res (@redirects) { print $res->request->uri }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Unshortening t.co links
by NERDVANA (Priest) on Sep 07, 2023 at 23:40 UTC | |
|
Re: Unshortening t.co links
by marto (Cardinal) on Sep 08, 2023 at 06:34 UTC | |
|
Re: Unshortening t.co links
by Bod (Parson) on Sep 07, 2023 at 23:03 UTC | |
by LanX (Saint) on Sep 08, 2023 at 12:17 UTC | |
by marto (Cardinal) on Sep 08, 2023 at 15:21 UTC |