TechAndCheck / hypatia

A server for various scraping tems
MIT License
0 stars 0 forks source link

Handle credentials being busted #70

Open cguess opened 1 year ago

cguess commented 1 year ago

There will, on occasion, come the time when credentials for various services get tagged as scraping and shut down temporarily or permanently.

The #1 concern is stopping scrapping for that service immediately so we don't keep throwing more and more errors and potentially turning a temporary turn off to a very permanent one. How do we do this? Probably by creating a new Setting (which we already use for API keys so very easy to setup) that just keeps track of if each service is enabled before scraping. This adds another db lookup for every job, but honestly? Not a big deal

The #2 concern is how do we keep the scraping going. Right now we have single credentials stored. We may consider adding a stack of credentials where if one goes down the second is automatically tried instead. If that works, it's then set as the default, and the old ones are tagged for checking.

This would require an actual UI probably, or we could maybe do it in a rake task/CLI implementation

This UI would have to include the following:

In addition we'll have to do the following:

cguess commented 1 year ago

To help this, I've begun implementing Forki::BlockedCredentialsError that can be caught.