Skip to content

Latest commit

 

History

History
30 lines (18 loc) · 725 Bytes

File metadata and controls

30 lines (18 loc) · 725 Bytes

Python-Youtube Api

A collection of helper functions which I use to simplify interfacing with the youtube api via google's python api client.

To Use

The google-api-python-client is the only requirement.

  • pip install google-api-python-client

Examples

Get a channels subscriptions:

import ytapi
from secrets import YOUTUBE_DATA_API_KEY

CHANNEL_ID = ...

service = ytapi.create_service('youtube', 'v3', YOUTUBE_DATA_API_KEY)

for channel in ytapi.subscriptions(CHANNEL_ID, service):
    print(channel.name, channel.channel_id)