小编Joh*_*ang的帖子

Python:从 YouTube 下载字幕

您好,我尝试使用 YouTube 数据 API 从 YouTube 视频下载字幕。我自定义YouTube 生成的示例代码

    #!/usr/bin/python
    # Usage example:
    # python captions.py --videoid='<video_id>' --name='<name>' --file='<file>' --language='<language>' --action='action'

    import httplib2
    import os
    import sys

    from apiclient.discovery import build_from_document
    from apiclient.errors import HttpError
    from oauth2client.client import flow_from_clientsecrets
    from oauth2client.file import Storage
    from oauth2client.tools import argparser, run_flow


    # The CLIENT_SECRETS_FILE variable specifies the name of a file that contains

    # the OAuth 2.0 information for this application, including its client_id and
    # client_secret. You can acquire …
Run Code Online (Sandbox Code Playgroud)

python youtube oauth youtube-data-api

0
推荐指数
1
解决办法
4395
查看次数

标签 统计

oauth ×1

python ×1

youtube ×1

youtube-data-api ×1