gpt4 book ai didi

python - 我如何使用带有 python 的 cron 来使用谷歌驱动器?

转载 作者:行者123 更新时间:2023-11-28 19:23:28 40 4
gpt4 key购买 nike

我尝试编写一个 cron,在用户的谷歌驱动器中写入文件,但我不知道如何授权我的应用程序在这个谷歌驱动器中写入。我尝试:

    SCOPE = [ 'https://www.googleapis.com/auth/drive.file',
'https://www.googleapis.com/auth/drive']
credentials = AppAssertionCredentials(scope = SCOPE)
http = httplib2.Http()
http = credentials.authorize(httplib2.Http(memcache))
service = build("storage", "v1beta1", http=http, developerKey = 'XXXXXXXXXXXX')

总是响应“未授权”。

最佳答案

http://www.maketecheasier.com/access-sync-google-drive-in-ubuntu/2012/06/06你可以试试这篇文章,以防它是你正在寻找的东西。希望对你有帮助

关于python - 我如何使用带有 python 的 cron 来使用谷歌驱动器?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18999406/

40 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com