18 lines
663 B
Bash
Executable File
18 lines
663 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
# scrape info from CoinWarz
|
|
|
|
for m in `curl -s https://www.coinwarz.com/cryptocurrency/coins | grep "/cryptocurrency/coins/" | sed "s/.*<a href=\"/https:\/\/www.coinwarz.com/;s/\".*//" | sort | uniq`
|
|
do
|
|
if [ "`grep $m coinwarz-skip.txt`" == "" ]
|
|
then
|
|
h="`curl -s $m`"
|
|
s="`for i in "Name" "Symbol / Tag" "Hash Algorithm" "Status" "Block Reward" "Difficulty"; do f="$i</b>"; echo "$h" | grep -4 "$f" | grep -v "$f" | sed "s/<span>//;s/<\/span>//;s/<.*>//" | tr -d "[:space:]" | sed "s/\$/\t/"; done; echo ""`"
|
|
echo $s
|
|
if [ "`echo $s | grep -i unhealthy`" != "" ]
|
|
then
|
|
echo $m >>coinwarz-skip.txt
|
|
fi
|
|
fi
|
|
done
|