Skip to content

Instantly share code, notes, and snippets.

@XWilliamY
Last active July 3, 2020 04:52
Show Gist options
  • Save XWilliamY/240a2f88be5ffd2c2bc76f03bec57ed2 to your computer and use it in GitHub Desktop.
Save XWilliamY/240a2f88be5ffd2c2bc76f03bec57ed2 to your computer and use it in GitHub Desktop.
from apiclient.discovery import build
def build_service(filename):
with open(filename) as f:
key = f.readline()
YOUTUBE_API_SERVICE_NAME = "youtube"
YOUTUBE_API_VERSION = "v3"
return build(YOUTUBE_API_SERVICE_NAME,
YOUTUBE_API_VERSION,
developerKey=key)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment