Created
December 28, 2020 22:46
-
-
Save renzon/9b981672e356d10ed1a0bcec2afafb27 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
from time import sleep | |
from decouple import config | |
from google.oauth2 import service_account | |
from google_auth_oauthlib.flow import InstalledAppFlow | |
from googleapiclient.discovery import build | |
from googleapiclient.errors import HttpError | |
API_KEY = config('API_KEY') | |
YOUTUBE_READ_WRITE_SCOPE = "https://www.googleapis.com/auth/youtube" | |
CLIENT_SECRETS_FILE = "client_secrets.json" | |
MISSING_CLIENT_SECRETS_MESSAGE = """ | |
WARNING: Please configure OAuth 2.0 | |
To make this sample run you will need to populate the client_secrets.json file | |
found at: | |
%s | |
with information from the API Console | |
https://console.developers.google.com/ | |
For more information about the client_secrets.json file format, please visit: | |
https://developers.google.com/api-client-library/python/guide/aaa_client_secrets | |
""" % os.path.abspath(os.path.join(os.path.dirname(__file__), | |
CLIENT_SECRETS_FILE)) | |
YOUTUBE_API_SERVICE_NAME = 'youtube' | |
YOUTUBE_API_VERSION = 'v3' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment