Skip to content

Commit 190d0da

Browse files
authored
[SSL: CERTIFICATE_VERIFY_FAILED] (#23)
Fix - Disable SSL Verification (Not Recommended):
1 parent 081d263 commit 190d0da

File tree

1 file changed

+4
-2
lines changed
  • custom_components/precoscombustiveis

1 file changed

+4
-2
lines changed

custom_components/precoscombustiveis/dgeg.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,8 @@ async def list_stations(self, distrito_id: str) -> list[Dict]:
9191
API_STATIONS_LIST.format(distrito_id),
9292
headers={
9393
"Content-Type": "application/json"
94-
}
94+
},
95+
ssl=False # Disable SSL verification
9596
) as res:
9697
if res.status == 200:
9798
json = await res.json()
@@ -119,7 +120,8 @@ async def getStation(self, id: str) -> Station:
119120
API_URI_TEMPLATE.format(id),
120121
headers={
121122
"Content-Type": "application/json"
122-
}
123+
},
124+
ssl=False # Disable SSL verification
123125
) as res:
124126
if res.status == 200 and res.content_type == "application/json":
125127
json = await res.json()

0 commit comments

Comments
 (0)