views.py 文件源码

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

项目:gepify 作者: nvlbg 项目源码 文件源码
def callback():
    code = request.args.get('code', None)

    if code is None:
        return render_template(
            'show_message.html',
            message='There was an error while trying to authenticate you.'
                    'Please, try again.'), 503

    flow = client.OAuth2WebServerFlow(
        YOUTUBE_CLIENT_ID,
        YOUTUBE_CLIENT_SECRET,
        scope='https://www.googleapis.com/auth/youtube.readonly',
        redirect_uri=YOUTUBE_REDIRECT_URI
    )
    credentials = flow.step2_exchange(code)
    session['credentials'] = credentials.to_json()
    influxdb.count('youtube.logins')
    return redirect(url_for('youtube.index'))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号