Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support env var settings for login creds #149

Open
zstumgoren opened this issue Aug 26, 2021 · 0 comments
Open

Support env var settings for login creds #149

zstumgoren opened this issue Aug 26, 2021 · 0 comments

Comments

@zstumgoren
Copy link
Member

Court-scraper currently expects credentials for sites that require login to be placed in a yaml config. We need to add support for looking up creds in env vars in order to support wider automated test coverage via GitHub Actions, per the discussion on #143

For non-CAPTCHA login tests, we might be able to get away with a simple user/pass env var lookup such as COURT_SCRAPER_LOGIN_USER and COURT_SCRAPER_LOGIN_PASS.

The only hitch there is that it requires us to use the same user/pass for all sites, which may or may not be possible depending on factors out of our control (e.g. password length/complexity requirements).

A more complex alternative would be to check for env var-based creds in a way that allows for customization by place ID (basically mirroring the approach of config.yaml). For example, COURT_SCRAPER_GA_DEKALB_USER and COURT_SCRAPER_GA_DEKALB_PASS, if set, could take precedence over values found in the config.yaml file.

We could start with the simple approach and then pivot to something more complex if the need arises.

Either approach will likely require updates in court_scraper.config as well as in the Odyssey platform scraper (and perhaps elsewhere).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant