Any way of collecting 24h mined stats from easily from site?
Simple bash script; but it can only scrape total; suppose i could load it up in a time series database and just run at 24hr intervals with delta vs "previous run". Typically pipe everything into telegraf/chrono. But the results are skewed based on payout.
Really want the "Total Earned 0.0000001 BTC" value scraped somehow (at a 24 hours crontab or loop)? Any good way of scraping?
#!/bin/sh
#vars
#url=http://zpool.ca/?address=38#####################
url=http://zpool.ca/site/tx?address=38######################
btc_rate=`curl -sS "
https://blockchain.info/tobtc?currency=USD&value=1"`
#subs
function fun_zpool {
zpool=$(wget -qO- $url |
hxnormalize -x |
#hxselect "Total" |
lynx -stdin -dump -nolist |
grep -Po 'Total \K(.*)$')
#get usd value
usd_value=`echo "scale=2; $zpool / $btc_rate" | bc`
#output
#echo BTC $zpool | column -t
#echo USD $usd_value | column -t
}
#main
fun_zpool
printf $usd_value