title: Mojolicious not following redirection from webarchive.org
body: <p>I'm using Mojolicious DOM and UserAgent to get the source of a page from Webarchive.org, parse it, and import it into a Dotclear database (using webarchive as a backup).
  In the source, there are "Previous" and "Next" links allowing to get to the different posts originaly made on the blog. </p>
  
  <p>The perl script I have developped is supposed to run through those links to import all pages of this blog's snapshot.
  It first get the source of the first post of the blog, parses it, put the result in a local DB, and gets the link under "Next" to do that same thing on the next post, until there is no more "Next" posts.</p>
  
  <p>As for the bases.</p>
  
  <p>But the trick is that the link I get from the source is not the link Webarchive has.
  Webarchive's links to snapshots go like this :</p>
  
  <pre><code>http://web.archive.org/web/20131012182412/http://www.mytarget.com/post?mypost
  </code></pre>
  
  <p>The big number between "web" and the original URL is (i guess) the date the snapshot was made. The trick is that it changes at each snapshot, and although it may appear on one post, the next post have been snapshoted on anotherdate. So the URL wont fit.</p>
  
  <p>When I click on the link i get from the source, it brings me to webarchive.org, which automaticaly searches on the page i pass, and redirect me to it.
  But when I try to get the source via the get() function of Mojolicious, it just gets the "Page not found" page of webarchive.</p>
  
  <p>So, there is my question : is there a way to let mojolicious follow the redirection of webarchive ? I activated max_redirects(5) on my UserAgent, but still does the same.</p>
  
  <p>Here is my code : </p>
  
  <pre><code>sub main{
      my ($url) = @_;
      my $ua = Mojo::UserAgent-&gt;new;
      $ua = $ua-&gt;max_redirects(5);
      my $dom = $ua-&gt;get($url)-&gt;res-&gt;dom;
  
      #...Treatment and parsing of the source ...
      return $nextUrl;
  }
  
  my $nextUrl="http://web.archive.org/web/20131012182412/http://www.mytarget.com/post?mypost";
  my $secondUrl;
  
  while ($nextUrl){
      $secondUrl = main($nextUrl);
      $nextUrl = $secondUrl;
  }
  </code></pre>
  
  <p>Thanks in advance...</p>