medusa-project / book-tracker

Medusa Book Tracker
0 stars 0 forks source link

Automate google check #36

Closed gaurijo closed 11 months ago

gaurijo commented 11 months ago

(This is a WIP and NOT ready to be merged yet)

This PR includes the following:

adolski commented 11 months ago

I think omniauth-google is not the right tool for this job. OmniAuth is used for logging into the Book Tracker itself, so if we were using omniauth-google, we would be able to log into the Book Tracker itself using our Google account credentials. But it wouldn't get us any closer to downloading that file.

If there is a solution, it could probably be fully encapsulated within the Google.check() method. Instead of reading the inventory file (_all_books.txt) from the application S3 bucket, here, it could be modified to go out and download it. That is the hard part, as the file is protected behind Google's authentication system which, as you noted, is automation-resistant. If it were available via Google's OAuth API, then an OAuth client library like this one could be used to access it. But it doesn't seem like that is the case.

It may just be that this problem is not solvable.

gaurijo commented 11 months ago

Okay, yes, it does seem like we've hit a wall in terms of automating the google check, so I'm wondering if it's best to table this issue (at least for now).

I could start working on issue 6, and at least see if I can get the Hathitrust and IAchecks to run in parallel after the import is done.

I guess the Google Check will just have to be a standalone manual check until a solution can be found, if any.