def self.lookup(place, fetch: RabbotHttp.method(:fetch))
text = place.to_s.strip
return usage_message if text.empty?
beach = resolve_beach(text)
url = "https://www.bom.gov.au/australia/wa/forecast/gold-coast.shtml"
url = "https://www.bom.gov.au/qld/forecasts/townsville.shtml" if beach.downcase.include?("townsville")
url = "https://www.bom.gov.au/qld/forecasts/cairns.shtml" if beach.downcase.include?("cairns")
html = fetch.call(url)
snippet = html.to_s.gsub(/<[^>]+>/, " ").squeeze(" ").strip
wind = snippet[/Wind[^.]{0,80}\./i]
swell = snippet[/Swell[^.]{0,80}\./i] || snippet[/Surf[^.]{0,80}\./i]
parts = [wind, swell].compact.map(&:strip).reject(&:empty?)
body = parts.empty? ? "Check BOM marine forecast for #{beach}" : parts.join(" ")
header = IrcFormat.report_header(tag: "SURF", title: beach, style: STYLE_TITLE)
footer = IrcFormat.report_footer("Bureau of Meteorology")
[header, body, footer].join("\n")
rescue StandardError
"Could not fetch surf info for #{text}"
end