diff --git a/bot.sh b/bot.sh index c0d55f0..e4f37b1 100755 --- a/bot.sh +++ b/bot.sh @@ -22,12 +22,10 @@ echo Camera Image grabbed ################################################################################# echo Grabbing Satellite Image -# scrap html and get image link -satellite_image_url=$(curl "https://www.meteorology.gov.mv/" -s | \ - grep -o 'https://mobile.codeworks.mv/uploads/Satellite/[^"]*' | \ - tail -n 1) -# Download the Setellite Image -curl $satellite_image_url -o $satellite_image +# scrap html, get image link and download it. +curl -s $(curl -s "https://www.meteorology.gov.mv/" | \ + grep -o 'https://mobile.codeworks.mv/uploads/Satellite/[^"]*' | \ + tail -n 1) -o $satellite_image echo Satellite Image grabbed #################################################################################