youtube.py 文件源码

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

项目:Zoom2Youtube 作者: Welltory 项目源码 文件源码
def get_auth_code(self):
        """ Get access token for connect to youtube api """
        oauth_url = 'https://accounts.google.com/o/oauth2/token'
        data = dict(
            refresh_token=self.refresh_token,
            client_id=self.client_id,
            client_secret=self.client_secret,
            grant_type='refresh_token',
        )

        headers = {
            'Content-Type': 'application/x-www-form-urlencoded',
            'Accept': 'application/json'
        }
        response = requests.post(oauth_url, data=data, headers=headers)
        response = response.json()
        return response.get('access_token')
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号