maubot_auto_youtube_preview
fork of this maubot plugin no longer requires !youtube will autodetect youtube.com or youtu.be links
maubot-youtube
A maubot plugin to display YouTube video details.
Configuration
Before configuring your instance, you must first create an API token at the Google Developer Console via the following steps:
- Create a new project
- Click "Enable APIs and Services", select the "YouTube Data API v3", and click "Enable"
- Click "Create Credentials", select "YouTube Data API v3", and choose "Public data" and copy your key into the
api_keyconfig setting.
Additionally, if you have URL previews enabled on your homeserver you may want to consider blacklisting youtube to prevent double previews. Example config for synapse:
url_preview_url_blacklist:
- netloc: 'youtube.com'
- netloc: 'www.youtube.com'
- netloc: 'youtu.be'
Usage
Once configured, you can use send a youtube.com or youtu.be url to view the details of the specified video.
Building
Use the mbc tool to build this plugin:
mbc build
Optionally, use the -u switch to upload it to your maubot instance, if configured:
mbc build -u
Since .mbp files are just zip archives with a different name, you can also just zip the files of this repository:
zip -r youtube.mbp *
License
This project is licensed under the GNU Affero General Public License v3.0, see LICENSE.