From a42c06f6108da26c1645190352252780b6655042 Mon Sep 17 00:00:00 2001 From: Guillermo Ramos Date: Tue, 4 Jun 2024 09:02:09 +0200 Subject: aesan: fixes --- aesan_alerts.rb | 6 ++---- 1 file 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 -- cgit v1.2.3