Mechanize retrieve headers

Hi all,

I’m using mechanize for web inspection, when I get a URL I get a refresh
URL in the headers:

\

When I ask to mechanize to list the metadata I do this:

pp $page.meta

I get:

[#<Mechanize::Page::Meta
“”
http://localhost/html/Splash.action?splash=”>]

How can I cleanly retrieve the refresh URL?

Thanks!

Robert Garrido wrote in post #998283:

Hi all,

I’m using mechanize for web inspection, when I get a URL I get a refresh
URL in the headers:

\

When I ask to mechanize to list the metadata I do this:

pp $page.meta

I get:

[#<Mechanize::Page::Meta
“”
http://localhost/html/Splash.action?splash=”>]

How can I cleanly retrieve the refresh URL?

Thanks!

The Mechanize docs follow the ruby tradition: they suck. So I would
just use a regex to get that tag from the html of the page.

On Fri, May 13, 2011 at 09:45:16AM +0900, 7stud – wrote:

The Mechanize docs follow the ruby tradition: they suck. So I would
just use a regex to get that tag from the html of the page.

Do you actually use Ruby, or just complain about it and insult people
who
ask questions about it?