I'm collecting gdrive file's meta data using colab like this.
!pip install kora
from kora.xattr import get_id
from google.colab import auth
auth.authenticate_user()
import gspread_dataframe as gd
import gspread
from google.auth import default
import pandas as pd
creds, _ = default()
import os
import time
import datetime
from google.colab import drive
drive.mount('/content/gdrive')
root_path = "/content/gdrive/myRoot/"
link = 'https://drive.google.com/drive/folders/'
for (root, directories, files) in os.walk(root_path):
for file in files:
ctime = os.path.getmtime(file_path)
last_update = datetime.datetime.strptime(time.ctime(ctime), "%c")
file_path = os.path.join(root, file)
fid = get_id(file_path)
I want to know how to get last editor information.
Thank you.
From the Google Drive API reference page for files you simply need to query the file's metadata using the lastModifyingUser.emailAddress
key.