我尝试在 PC 上的自动运行中使用 python 上的 API。但我不能,因为每次程序启动时,它都会询问我有关授权码的信息。这是我的代码:
client_secret_file = "client_secret.json"
flow = google_auth_oauthlib.flow.InstalledAppFlow.from_client_secrets_file(
client_secrets_file, scopes)
credentials = flow.run_console()
youtube = googleapiclient.discovery.build(
api_service_name, api_version, credentials=credentials)
Run Code Online (Sandbox Code Playgroud)
有什么帮助吗?谢谢
python google-api youtube-api google-oauth google-api-python-client