From 2ea53eb56645e5706b3f9f200b57db01c88e9ba1 Mon Sep 17 00:00:00 2001 From: olli Date: Sat, 7 Oct 2023 14:41:36 +0200 Subject: [PATCH] retry when no data fix --- dabo/functions/get_marketdata.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dabo/functions/get_marketdata.sh b/dabo/functions/get_marketdata.sh index 9411024..e6b333a 100644 --- a/dabo/functions/get_marketdata.sh +++ b/dabo/functions/get_marketdata.sh @@ -6,9 +6,9 @@ function get_marketdata { # check source platform for parsing parameters, prepare and run wget command >MARKET_DATA_CMD - echo ${f_url} | grep -q "boerse.de" && echo "wget -q -O - ${f_url} | egrep 'itemprop=\"price\" content=\"[0-9]+\.[0-9]+\"' | cut -d\\\" -f6 | grep -q '[0-9]'" >MARKET_DATA_CMD - echo ${f_url} | egrep -q "investing.com.+economic-calendar" && echo "wget -q -O - ${f_url} | egrep 'Actual.+Forecast.+Previous' | cut -d'>' -f7,11 | cut -d'<' -f1,2 | sed 's#,##g' | sed 's#\%##g' | sed 's##,#' | grep -q '[0-9]'" >MARKET_DATA_CMD - echo ${f_url} | egrep -q "investing.com.+indices" && echo "wget -q -O - ${f_url} | sed 's##\n#g' | grep 'text-5xl font-bold leading-9 md:text-' | cut -d'>' -f5 | sed 's#,##g' | grep -q '[0-9]'" >MARKET_DATA_CMD + echo ${f_url} | grep -q "boerse.de" && echo "wget -q -O - ${f_url} | egrep 'itemprop=\"price\" content=\"[0-9]+\.[0-9]+\"' | cut -d\\\" -f6 | grep '[0-9]'" >MARKET_DATA_CMD + echo ${f_url} | egrep -q "investing.com.+economic-calendar" && echo "wget -q -O - ${f_url} | egrep 'Actual.+Forecast.+Previous' | cut -d'>' -f7,11 | cut -d'<' -f1,2 | sed 's#,##g' | sed 's#\%##g' | sed 's##,#' | grep '[0-9]'" >MARKET_DATA_CMD + echo ${f_url} | egrep -q "investing.com.+indices" && echo "wget -q -O - ${f_url} | sed 's##\n#g' | grep 'text-5xl font-bold leading-9 md:text-' | cut -d'>' -f5 | sed 's#,##g' | grep '[0-9]'" >MARKET_DATA_CMD [ -s MARKET_DATA_CMD ] || echo "wget -q -O - ${f_url}" >MARKET_DATA_CMD g_runcmd g_retrycmd sh MARKET_DATA_CMD >MARKET_DATA_CMD_OUT-${f_name}.tmp 2>MARKET_DATA_CMD_OUT-${f_name}.tmp.err