- This project is a giant proof of concept, which is running at http://chanmon.rkhtech.org/.
- If you notice any bugs with this project, please create an issue or email ryan@rkhtech.org.
- Implements the YouTube API, to be able to access private and unlisted videos on a channel.
- Uses a shared database (MySQL) for simple web integration.
- Proof of concept web interface for signup and viewing the list.
- Requires Google API authorization for signups and viewing of channel video history.
- Setup API key and oauth client at Google. (https://console.developers.google.com/apis/credentials)
- Install Python and the required modules. (MySQLdb connector and requests (web request library)).
- Install and setup your LAMP/LEMP stack. (PHP 7 and MySQL/MariaDB required)
- Create the database and its associated username + password, then import the schema provided (schema.sql).
- Create the db.php file outside the public_html directory with the following format:
<?php
$db_host = "localhost";
$db_user = "";
$db_pass = "";
$db_db = "";
?>
- Download the oauth secret file, rename it to client_secrets.json, and place it outside the public_html directory.
- Go through and edit the PHP files to ensure they are pointing to the correct file locations for db.php and client_secrets.json.
- If all goes well, you should be able to authorize a YouTube channel, and watch it add an entry into the channels table of the MySQL database.
- From there, you should be able to give the Python script a test run, if it does not show any errors, then you are free to add it into your systems crontab. (Recommended to be run hourly.)
- Profit?
- Consolidate the db.php locations and client_secrets location to absolute file locations, and place them into the assets/header/main.php file, which is included on every API and front facing web page.
- Optimize the 'videos' table of the MySQL database to ensure high performance when requesting the list of videos for a creator.