0

I want to download a Google Sheet (and/or Doc, or Colab Notebook) from an "Anyone can View" sharing URL, if the file is newer than my local copy. To do that, I need to find out when the remote file was last modified. Which I thought shouldn't be hard.

There are threads explaining how to do this for regular files on websites that make use of the HTML Last-Modified property, but Google doesn't provide this field in its headers. It provides a Date: but that's just the download date/time that updates every moment.

I see threads about doing this from within the Doc or Sheet itself. My question is not about that. I'm talking about getting the info remotely by running a python script on my local machine.

I see a thread about using the Google Drive API v3, but....is it really necessary to go through all that (e.g. install oauth, register an API key, etc. effectively create an entire Google app *) just to find out when a publicly-available file was last modified? Is there an easier way?

Thanks!

EDIT: * I started down the road of Google Drive API but I find it confusing and overwhelming. It's like they think I'm trying to create an app for general users for the Android Store, instead of just myself. (??)

sh37211
  • 1,411
  • 1
  • 17
  • 39
  • In your situation, for example, how about using Web Apps created by Google Apps Script as the pseudo API? [Ref](https://developers.google.com/apps-script/guides/web) When this Web Apps is used, you can directly retrieve the last modified date without authorizing it because when the Web Apps is deployed, the authorization process has already been done. If this was not the direction you expect, I apologize. – Tanaike Oct 12 '21 at 05:41
  • Docs and Sheets are SaaS products, you always need a user to make use of them. Why is it confusing to [configure a client](https://developers.google.com/drive/api/v3/quickstart/python)? – Jose Vasquez Oct 13 '21 at 07:45

0 Answers0