Skip to content

Commit

Permalink
verify=False to ignore SSL errors for PG&E
Browse files Browse the repository at this point in the history
Got this error:

    HTTPSConnectionPool(host='apim.pge.com', port=443): Max retries exceeded with url:
    /cocoutage/outages/getOutagesRegions?regionType=city&expand=true
    (Caused by SSLError(SSLCertVerificationError("hostname 'apim.pge.com' doesn't match '*.cloud.pge.com'")))
  • Loading branch information
simonw committed Nov 11, 2021
1 parent 3eed6ec commit 2511dec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pge.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class PGEOutages(DeltaScraper):
noun = "outage"

def fetch_data(self):
data = requests.get(self.url, timeout=10).json()
data = requests.get(self.url, timeout=10, verify=False).json()
# Flatten into a list of outages
outages = []
for region in data["outagesRegions"]:
Expand Down

0 comments on commit 2511dec

Please sign in to comment.