summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xaesan_alerts.rb6
1 files changed, 2 insertions, 4 deletions
diff --git a/aesan_alerts.rb b/aesan_alerts.rb
index b909ee7..675c047 100755
--- a/aesan_alerts.rb
+++ b/aesan_alerts.rb
@@ -33,7 +33,7 @@ def fetch_first_paragraph(url)
ps = document.xpath('//section[@class="theContent"]/p/a').filter_map do |p|
title = p.text.gsub(/^\s+|\s+$/, '')
- "* #{title} - #{AESAN_HOST}/#{p['href']}" if read_title(READ_TITLES_FILE, title)
+ "* #{title} - #{AESAN_HOST}#{p['href']}" if read_title(READ_TITLES_FILE, title)
end
if ps.any?
@@ -43,11 +43,9 @@ def fetch_first_paragraph(url)
puts "Se han publicado una o más alertas alimentarias en AESAN:\n"
end
puts ps
- else
- warn "No se encontró ningún resultado"
end
else
- warn "Error al acceder a la página: #{response.code} #{response.message}"
+ warn "Error al descargar página: #{response.code} #{response.message}"
end
end