Module: Skh
- Defined in:
- lib/module/skh.rb
Overview
新光醫療財團法人新光吳火獅紀念醫院
Class Method Summary collapse
Class Method Details
.crawl ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/module/skh.rb', line 3 def Skh.crawl hash = {} url = "https://regis.skh.org.tw/ERONLINE/INDEX.aspx" begin page = Nokogiri::HTML(open(url)) hash[:hospital] = "skh" hash[:wait_internal_medicine] = page.css("#L_TOT2").text.strip hash[:wait_surgery] = page.css("#L_TOT1").text.strip hash[:wait_paediatrics] = page.css("#L_TOT3").text.strip hash[:wait_push_bed] = page.css("#L_TOT7").text.strip hash[:wait_bed] = page.css("#L_TOT5").text.strip hash[:wait_icu] = page.css("#L_TOT6").text.strip rescue Exception => e p e. return nil end return hash end |