Skip to content

Instantly share code, notes, and snippets.

@go-east

go-east/scrap.rb Secret

Last active November 6, 2016 18:28
Show Gist options
  • Save go-east/98e22e0fae70d4e2755b3c7ff02964f1 to your computer and use it in GitHub Desktop.
Save go-east/98e22e0fae70d4e2755b3c7ff02964f1 to your computer and use it in GitHub Desktop.
require 'open-uri'
require 'nokogiri'
def crawler
html_file = open("https://www.telemat.org/FFE/sif/?cs=4.b89a903644ffd5d8535b7c2e3ea76df40e938ea270daff04b31071e7fd06c55d6bfbdc96102d6a2cf9d09b11fd91f11aac2a8809e0bed31e88d207b9157307841540ce094208aa2f1b90a7f3020671484fedc42be5785112a35303bbe8c62e76727e2e0f14d72dc972270270c61155299c2a")
html_doc = Nokogiri::HTML(html_file)
#Working html_doc.search('.impair td:nth-child(4)').each do |element|
html_doc.search('.tablesorter-hasChildRow td:nth-child(4)').each do |element|
print element.text
print element.attribute("href")
end
end
crawler
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment