Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/ruby/25.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby Mechanize检索头_Ruby_Mechanize - Fatal编程技术网

Ruby Mechanize检索头

Ruby Mechanize检索头,ruby,mechanize,Ruby,Mechanize,我正在使用mechanize进行web检查,当我得到一个URL时,我会得到一个刷新 标题中的URL: meta http-equiv="refresh" content="2;url=/html/Splash.action?splash=" 当我要求mechanize列出元数据时,我会这样做: pp$page.meta 我得到: Mechanize::Page::Meta "" "http://localhost/html/Splash.action?splash=" 我如何才能干净

我正在使用mechanize进行web检查,当我得到一个URL时,我会得到一个刷新 标题中的URL:

meta http-equiv="refresh" content="2;url=/html/Splash.action?splash="
当我要求mechanize列出元数据时,我会这样做:

pp$page.meta

我得到:

Mechanize::Page::Meta
  ""
  "http://localhost/html/Splash.action?splash="
我如何才能干净地检索刷新URL


谢谢

要么是mechanize中的一个bug,要么是html有问题,因为它应该有这个是meta。 顺便说一句,Mechanize还具有“follow#u meta_refresh”属性,默认为false。

此功能:

$page.meta.first.href