Skip to content

Instantly share code, notes, and snippets.

@bahamas10
Created September 1, 2021 02:39
Show Gist options
  • Select an option

  • Save bahamas10/79aef17342af416e8731bc647c558eb7 to your computer and use it in GitHub Desktop.

Select an option

Save bahamas10/79aef17342af416e8731bc647c558eb7 to your computer and use it in GitHub Desktop.
Quick and dirty youtube subscriber count getter
$ ./get-subscriber-count
2.91K subscribers
#!/usr/bin/env bash
# set to the about page of your channel
url='https://www.youtube.com/c/bahamas10/about'
curl -sS "$url" | perl -wln -e '/"subscriberCountText":\{[^}]+"label":"([^"]+)"/ and print $1;'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment