我无法通过Nokogiri解析https://chromedriver.storage.googleapis.com/index.html?path=79.0.3945.36/
获得链接列表。我在做什么错了?
links = Nokoiri::HTML('https://chromedriver.storage.googleapis.com/index.html?path=79.0.3945.36/')
或
links = Nokoiri::XML('https://chromedriver.storage.googleapis.com/index.html?path=79.0.3945.36/')
--->
#(Document:0x3fcdda1b988c {
name = "document",children = [
#(DTD:0x3fcdda1b5b24 { name = "html" }),#(Element:0x3fcdda1b46fc {
name = "html",children = [
#(Element:0x3fcdda1b0804 {
name = "body",children = [
#(Element:0x3fcdda1ac920 {
name = "p",children = [ #(Text "https://chromedriver.storage.googleapis.com/index.html?path=79.0.3945.36/")]
})]
})]
})]
})
puts links.to_html
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html><body><p>https://chromedriver.storage.googleapis.com/index.html?path=79.0.3945.36/</p></body></html>
=> nil