0
我一直很努力,但我不能讓這個網頁上這些特定鏈接: http://www.windowsphone.com/en-us/store/top-free-apps 我想在這個頁面左側的鏈接中的每一個,娛樂例如,但我不能找到合適的參考獲取它們。 它的腳本:如何提取這些在Ruby中使用機械化的特定鏈接?
require 'mechanize'
agent = Mechanize.new
page = agent.get("http://www.windowsphone.com/en-us/store/top-free-apps")
page.links_with(???)
我應該怎麼放,而不是???所以我不能得到這些鏈接? 我試過的東西,如:
page.links_with(:class => 'categoryNav navText')
OR
page.links_with(:class => 'categoryNav')
OR
page.links_with(:class => 'navText')
等 誰能幫助嗎?