PyDrive
PyDrive copied to clipboard
How to use the pydrive when I get" The authentication flow has completed."
I use the pycharm.When I run next code .I can get the message: " The authentication flow has completed."Then what next?I have tried again and again.How can I continue my code.For example:continue upload?
from pydrive.auth import GoogleAuth gauth = GoogleAuth() gauth.LocalWebserverAuth() # Creates local webserver and auto handles authentication. from pydrive.drive import GoogleDrive
drive = GoogleDrive(gauth)
file1 = drive.CreateFile({'title': 'Hello.txt'}) # Create GoogleDriveFile instance with title 'Hello.txt'. file1.SetContentString('Hello World!') # Set content of the file from given string. file1.Upload()
If you live in Chinese mainland, this script maybe not wrok at all. But it work fine in my foreign server on America.