Ruby Mechanize检索头
我正在使用mechanize进行web检查,当我得到一个URL时,我会得到一个刷新 标题中的URL: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=" 我如何才能干净
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