Skip to content

Commit

Permalink
only add new surf reports
Browse files Browse the repository at this point in the history
  • Loading branch information
ephekt committed Feb 25, 2012
1 parent baa19fa commit 1c1b3eb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/grab_reports.rb
Expand Up @@ -31,7 +31,6 @@ def grab_page url
}

surf_spots.each do |spot,url|
height = "Not Available or too low to quantify"
begin
page = grab_page(url)
if page.include? "text-surfheight"
Expand All @@ -45,7 +44,9 @@ def grab_page url
puts "Tried to parse & grab report for #{spot} but failed -- #{e}"
next
end


next unless height

q = "insert into `surf_reports` (location,height) VALUES ('#{spot}','#{height}');"
puts q
begin
Expand Down

0 comments on commit 1c1b3eb

Please sign in to comment.