Skip to content

ClaudeBot/hubot-youtube-info

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hubot-youtube-info

Build Status devDependency Status

Shows video metadata when YouTube URLs are seen.

Youtubeのリンクを見た時に動画のメタデータを表示する

Important

This script was not created by me, I have only made a repository for it and made some minor changes. Aside from those, the Copyright for this script lies with GitHub Inc.

Credit for authorship of this script goes to mmb. The original script may be found here.

How to install

The Claudebot repository comes with hubot-youtube-info already set as a script, and you can follow that example.

To add this script to your own version of hubot, edit package.json to contain the latest version of hubot-youtube-info, and the same for external-scripts.json. Then simply run npm update or npm install.

How to use

The script is often coupled with an irc adapter, and will listen to chat for any valid youtube links. Simply paste a link, and the bot will do the rest.

GOOGLE_API_KEY environment variable should be set for script to function properly. To obtain API key: https://www.youtube.com/watch?v=JbWnRhHfTDA

Obtaining a $GOOGLE_API_KEY

  1. Create a Google account to gain access to the Developers Console && create a Project
  2. Find and enable access to the "Youtube Data API v3" for your project
  3. Create a "Public" access token for your project
  4. Set the $GOOGLE_API_KEY environment variable to this token

Summary of changes

  1. Script now exists independently of the hubot-scripts bundle, and may be downloaded via npm.
  2. Added date of video publish/upload to the information printed about the video.
  3. Fixed a bug in the script that caused it to crash if a video lacked ratings.
  4. Added support for gaming subdomain.