I have a bit of python code using PyDrive, to download files from a shared google drive folder. It looks like this.
from pydrive2.auth import GoogleAuth
from pydrive2.drive import GoogleDrive
gauth = GoogleAuth()
gauth.CommandLineAuth()
drive = GoogleDrive(gauth)
file_list = drive.ListFile({'q': "'XXXXXXXXXXXXXXXXXXXXXXXX' in parents and trashed=false"}).GetList()
for file2 in file_list:
string = "'"+ file2['id'] +"'" + " in parents and trashed=false"
file_list2 = drive.ListFile({'q': string}).GetList()
print(file2['title'], file2['id'])
for file3 in file_list2:
file3.GetContentFile('/data/' + file3['title'])
print('downloaded: ', file3['title'], file3['id'])
This downloads roughly a TB of data in many tens of thousands of files. (The original file link is not XXXXXXXX, I just added that to avoid using the actual file ID in this example). The code works great for like the first 25k files, when it suddenly fails with
code: 403, message: Daily Limit for Unauthenticated Use Exceeded. Continued use requires signup.
I sign in successfully with OAuth and my google drive api is enabled and it has a quota of 10,000,000 requests a day (far more than I am using). Why does it think I am still using an anonymous account and hitting me with this error? It is my understanding that because it is a file that I have in my shared drive and because I am signed in I shouldn't be encountering this, whats up with that?