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

Pepco example #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Pepco example #3

wants to merge 1 commit into from

Conversation

bretwalker
Copy link
Member

This is an example of what's required to set up a new scraper.

Read more about why this data can be useful and how it can be made available here:
https://codeforkentuckiana.org/2019-12-18-power-utility-data/

If this repo is cloned, lgeku_scraper.py can be replaced with another location-specific scraper, like the one in this PR.

instance_id and view_id come from the outage map's HTML:
https://kubra.io/stormcenter/views/66f63a73-3b4a-4b2a-a833-f01668ef4986
which is iframed in:
https://www.pepco.com/Outages/CheckOutageStatus/Pages/ViewOutageMap.aspx

owner and repo need to be set to the repo where the outage JSON should be written.

The only other thing to do is to add a GitHub token to the cloned repo's Actions so that it can write to the destination repo.

  1. Create a personal access token using an account that has access to the destination repo: https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line
  2. Add it to GitHub actions, giving it the name GH_TOKEN: https://help.github.com/en/actions/automating-your-workflow-with-github-actions/creating-and-using-encrypted-secrets

The action should have been copied over and should be picked up and execute an Action every 15 minutes, scraping and saving the current outages.

ghost referenced this pull request in open-austin/energy-outage Feb 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant