Skip to content

Script for fetching YouTube statistics from the API and sending them to a split-flap display

License

Notifications You must be signed in to change notification settings

dmadison/splitflap-youtube-stats

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Split-Flap YouTube Statistics

This project fetches channel statistics from YouTube's Data API and sends them to a DIY split-flap display.

YouTube Video: Split-Flap Subscriber Counter

For more information, watch the YouTube video or check out the project article here.

Getting Started

Running the script requires Python 3. The script was developed using Python 3.8 - note that earlier versions may not be compatible.

To use the script, first install the package dependencies using pip:

python -m pip install -r requirements.txt

The script can be executed from the command line. There are two required positional arguments:

  • api_key - the Google API key for accessing the YouTube Data API. If you do not have an API key, you can create one here.
  • channel_id - the ID of the YouTube channel to fetch statistics for. For most people this can be found as part of the URL of the channel. If you do not know your channel ID, Google has some information on finding it here.

You must also have a split-flap display connected via serial. You can specify the port using the --port argument, otherwise the script will use the default port. If you do not have a display you can test the output using the --demo command line flag. Note that some features may not work correctly without a connected display.

License

The splitflap script for communicating with the display is a copy from the splitflap project, and is licensed under the Apache v2 license.

All other files, including the splitflap_youtube_stats script, are licensed under the terms of the MIT license. See the LICENSE file for more information.