我正在尝试每天从我的服务器上传视频到我的帐户,而浏览器访问不存在。我可以在我的桌面上执行此操作,通过运行下面提到的脚本打开浏览器,询问我的权限并完成上传视频所需的完整授权,然后上传视频。
python upload_video.py --file clips/concatenated.mp4 --title testing --desc empty_dec
/Users/devansh.dalal/Desktop/hackathon/tiktoki/venv/lib/python3.7/site-packages/oauth2client/_helpers.py:255: UserWarning: Cannot access upload_video.py-oauth2.json: No such file or directory
warnings.warn(_MISSING_FILE_MESSAGE.format(filename))
Your browser has been opened to visit:
https://accounts.google.com/o/oauth2/auth?client_id=73183172161-48495o1tqgjgih3v7j218av2bghdcm30.apps.googleusercontent.com&redirect_uri=http%3A%2F%2Flocalhost%3A8080%2F&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fyoutube.upload&access_type=offline&response_type=code
If your browser is on a different machine then exit and re-run this
application with the command-line parameter
--noauth_local_webserver
Authentication successful.
Uploading file...
但我想要一个不需要手动授权脚本的解决方案,因为我的服务器是完全安全的。请问有什么建议吗?