From 490b04802cd2f4b235e1ab5b8ba7a91886cf9f2e Mon Sep 17 00:00:00 2001 From: Pseudavid Date: Sat, 15 Feb 2025 10:14:17 +0100 Subject: [PATCH] =?UTF-8?q?Madrid:=20cambio=20el=20m=C3=A9todo=20para=20ex?= =?UTF-8?q?traer=20la=20URL=20del=20PDF=20que=20descargamos.=20El=20nuevo?= =?UTF-8?q?=20m=C3=A9todo=20se=20basa=20m=C3=A1s=20en=20el=20contenido=20d?= =?UTF-8?q?el=20c=C3=B3digo=20HTML=20que=20en=20su=20formato=20y=20creo=20?= =?UTF-8?q?que=20puede=20ser=20mejor=20a=20largo=20plazo.=20fanta,=20puede?= =?UTF-8?q?s=20cambiarlo=20si=20lo=20ves=20peor.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cpdAlerts.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpdAlerts.sh b/cpdAlerts.sh index b93980d..f13af51 100755 --- a/cpdAlerts.sh +++ b/cpdAlerts.sh @@ -50,7 +50,7 @@ function madrid { comunidad="Madrid" pdfFile=".boletin$comunidad.pdf" mainURL="https://bocm.es" - pdfURL=$(wget -q $mainURL -O - | grep -i "Descargar el boletín completo" | awk '{ print $12 }' | cut -d "\"" -f 2) + pdfURL=$(wget -q $mainURL -O - | grep -i -o "" | grep -o -i "http.*\.PDF") wget -q $pdfURL -O $pdfFile if [ "$(pdftotext $pdfFile - | grep -i -E -n -3 "$keyWords" | tee .cpds | wc -l)" = 0 ]; then echo "0 resultados"; rm -rf .cpds .boletin*; exit; else sendMail $pdfURL $comunidad;fi rm -rf .cpds .boletin*