youtube.py 文件源码

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

项目:odl-video-service 作者: mitodl 项目源码 文件源码
def __init__(self):
        """
        Generate an authorized YouTube API client and S3 client
        """
        credentials = oauth2client.client.GoogleCredentials(
            settings.YT_ACCESS_TOKEN,
            settings.YT_CLIENT_ID,
            settings.YT_CLIENT_SECRET,
            settings.YT_REFRESH_TOKEN,
            None,
            'https://accounts.google.com/o/oauth2/token',
            None)
        authorization = credentials.authorize(httplib2.Http())
        credentials.refresh(authorization)
        self.client = build('youtube', 'v3', credentials=credentials)
        self.s3 = boto3.client('s3')
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号