Skip to content

Commit

Permalink
Resolve broken proxy for nottingham city and simplify json processing
Browse files Browse the repository at this point in the history
  • Loading branch information
TurnrDev authored Nov 3, 2024
1 parent 1de7d67 commit eb17164
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import datetime
import json

import requests
from waste_collection_schedule import Collection # type: ignore[attr-defined]
Expand Down Expand Up @@ -30,11 +29,11 @@ def __init__(self, uprn):
def fetch(self):
# get json file
r = requests.get(
f"https://geoserver.nottinghamcity.gov.uk/myproperty/handler/proxy.ashx?https://geoserver.nottinghamcity.gov.uk/bincollections2/api/collection/{self._uprn}"
f"https://geoserver.nottinghamcity.gov.uk/bincollections2/api/collection/{self._uprn}"
)

# extract data from json
data = json.loads(r.text)
data = r.json()

entries = []

Expand Down

0 comments on commit eb17164

Please sign in to comment.