我正在尝试查找以下页面的图像 xpath:http ://www.spoonsisters.com/product/1032000/38710.html
我可以通过浏览器查看 image_url,但是当我尝试通过 Mechanize 找到它时:
page = Agent.get("http://www.spoonsisters.com/product/1032000/38710.html")
page.parser.xpath('('//*[@id="main_image"]')')
=> [#<Nokogiri::XML::Element:0x80484c7c name="img" attributes=[#<Nokogiri::XML::Attr:0x80484bdc name="id" value="main_image">, #<Nokogiri::XML::Attr:0x80484bc8 name="src">, #<Nokogiri::XML::Attr:0x80484b8c name="alt" value="Paper Cocktail Napkins - What happens tonight goes on Facebook tomorrow">]>]
我得到'src'>空白。如何找到 image_url?