Skip to content

Instantly share code, notes, and snippets.

@meicookies
Created November 10, 2021 10:37
Show Gist options
  • Select an option

  • Save meicookies/5a98d8da11658856ac2f94ced34cce1b to your computer and use it in GitHub Desktop.

Select an option

Save meicookies/5a98d8da11658856ac2f94ced34cce1b to your computer and use it in GitHub Desktop.
#!/bin/bash
[[ -z $1 ]] && echo -e "$0 [sites]" && exit
domain=$(basename $1)
url=$(curl -w "%{http_code}\n" -s $domain -o /dev/null)
statshow="https://www.statshow.com/www"
if [[ $url -ne 000 ]]; then
result=$(curl -s $statshow/$domain \
| htmlq --pretty | grep Daily | htmlq --text span \
| head -n 2 | tail -n 1 2>/dev/null)
echo "$domain"
echo "Daily visitors: $result"
else
echo "$1 Url Not Found"
fi
# coded by ./meicookies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment