Spaces:
Sleeping
Sleeping
Update google_api_deploy.py
Browse files- google_api_deploy.py +1 -2
google_api_deploy.py
CHANGED
|
@@ -33,7 +33,7 @@ def authenticate_google_drive():
|
|
| 33 |
else:
|
| 34 |
flow = InstalledAppFlow.from_client_secrets_file(
|
| 35 |
'temp_credentials.json', SCOPES)
|
| 36 |
-
creds = flow.
|
| 37 |
with open('token.pickle', 'wb') as token:
|
| 38 |
pickle.dump(creds, token)
|
| 39 |
service = build('drive', 'v3', credentials=creds)
|
|
@@ -81,4 +81,3 @@ def monitor_google_doc(service, file_id):
|
|
| 81 |
last_content = current_content
|
| 82 |
time.sleep(10)
|
| 83 |
|
| 84 |
-
|
|
|
|
| 33 |
else:
|
| 34 |
flow = InstalledAppFlow.from_client_secrets_file(
|
| 35 |
'temp_credentials.json', SCOPES)
|
| 36 |
+
creds = flow.run_console()
|
| 37 |
with open('token.pickle', 'wb') as token:
|
| 38 |
pickle.dump(creds, token)
|
| 39 |
service = build('drive', 'v3', credentials=creds)
|
|
|
|
| 81 |
last_content = current_content
|
| 82 |
time.sleep(10)
|
| 83 |
|
|
|