transcribe.py 文件源码

python
阅读 22 收藏 0 点赞 0 评论 0

项目:google_transcribe 作者: wroberts 项目源码 文件源码
def get_drive_service():
    '''
    Returns an object used to interact with the Google Drive API.
    '''
    flow = client.flow_from_clientsecrets(
        get_credentials_path('secret.json'),
        'https://www.googleapis.com/auth/drive')
    flow.user_agent = USER_AGENT_NAME
    store = Storage(get_credentials_path('storage.dat', False))
    credentials = store.get()
    if not credentials or credentials.invalid:
        flags = tools.argparser.parse_args(args=[])
        credentials = tools.run_flow(flow, store, flags)
    http = credentials.authorize(httplib2.Http())
    service = discovery.build('drive', 'v3', http=http)
    return service
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号