Last active
March 6, 2016 23:20
-
-
Save moonhouse/9a35751b07949efdaabe to your computer and use it in GitHub Desktop.
Print subscriber count from a Youtube channel. Can be used with BitBar. Replace YOURAPIKEY with an actual Youtube API key from https://console.developers.google.com/
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| curl 'https://www.googleapis.com/youtube/v3/channels?part=statistics&id=UCSGHj0YjencmGUSksbMbBVQ&key=YOURAPIKEY' 2>/dev/null | grep -o '"subscriberCount": "\d*"' | tr -d -c 0-9 |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
chmod +x youtube-subscriber.30m.shThe .30m. in the filename tells BitBar to refresh the data every 30 minutes (and can be changed to another number).