Hi everyone,<br>My quest with mechanize/Hpricot continues :)<br>Something extremely strange happened today - some simple working code broke down, and i can't figure out why.<br><br>I am trying to access a <a href="http://piratebay.org">
piratebay.org</a> search page, which does a redirect to a relative url like this:<br>original link:<br><a href="http://thepiratebay.org/s/?page=0&orderby=3&q=football+manager+2008&searchTitle=on">http://thepiratebay.org/s/?page=0&orderby=3&q=football+manager+2008&searchTitle=on
</a><br><br>redirects to:<br>/search/football manager 2008/0/3/0<br><br>Now, this all worked dandily up till yesterday. The page was redirected fine, and mechanize even handled the cookie that was sent back from the site.
<br>But today, i am getting this strange error:<br>"URI::InvalidURIError: bad URI(is not URI?): /search/football manager/2008/0/3/0"<br>Mechanize gives the following message: <br>"NoMethodError: You have a nil object when you didn't expect it!
<br>You might have expected an instance of Array.<br>The error occurred while evaluating nil.last"<br> from C:/Web/ruby/lib/ruby/gems/1.8/gems/mechanize-0.6.10/lib/mechanize.rb:402:in `to_absolute_uri'<br><br>I have tested this on 2 different machines, and they both break down.
<br>Can someone please give it a go and see if they can figure it out?<br>I would be very very thankful :)<br><br>Thanks,<br>Ehud<br><br>PS - I am using hpricot 0.6, and the redirected page is parsed correctly when accessed directly.
<br>