class Scraper
Public Instance Methods
get_names()
click to toggle source
# File lib/set_thailand_but_delta.rb, line 11 def get_names doc = Nokogiri::HTML(URI.open("https://www.set.or.th/set/companyhighlight.do?symbol=DELTA&ssoPageId=5&language=th&country=TH")) price = doc.css('#maincontent > div > div.table-responsive > table > tbody:nth-child(3) > tr:nth-child(2) > td:nth-child(5)').text name=doc.css('#maincontent > div > div:nth-child(3) > div.col-xs-12.col-md-12.col-lg-8 > h3').text "#{name} : #{price}" end
initalize()
click to toggle source
# File lib/set_thailand_but_delta.rb, line 7 def initalize @parse_page = Nokogiri::HTML(URI.open("https://www.set.or.th/set/companyhighlight.do?symbol=DELTA&ssoPageId=5&language=th&country=TH")) end