prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  Ku-ring-gai Council doesn't work if there is a house number 1A
  works - 1A Latona Street PYMBLE 2073
  doesn't work - 1 Latona Street PYMBLE 2073
  
  Both exist
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `custom_components/waste_collection_schedule/waste_collection_schedule/source/kuringgai_nsw_gov_au.py`
  Content:
  ```
  1 import datetime
  2 import json
  3 import requests
  4 
  5 from bs4 import BeautifulSoup
  6 from requests.utils import requote_uri
  7 from waste_collection_schedule import Collection
  8 
  9 TITLE = "Ku-ring-gai Council"
  10 DESCRIPTION = "Source for Ku-ring-gai Council waste collection."
  11 URL = "https://www.krg.nsw.gov.au"
  12 TEST_CASES = {
  13     "randomHouse": {
  14         "post_code": "2070",
  15         "suburb": "LINDFIELD",
  16         "street_name": "Wolseley Road",
  17         "street_number": "42",
  18     },
  19     "randomAppartment": {
  20         "post_code": "2074",
  21         "suburb": "WARRAWEE",
  22         "street_name": "Cherry Street",
  23         "street_number": "4/9",
  24     },
  25     "randomMultiunit": {
  26         "post_code": "2075",
  27         "suburb": "ST IVES",
  28         "street_name": "Kitchener Street",
  29         "street_number": "99/2-8",
  30     },
  31 }
  32 
  33 API_URLS = {
  34     "session":"https://www.krg.nsw.gov.au" ,
  35     "search": "https://www.krg.nsw.gov.au/api/v1/myarea/search?keywords={}",
  36     "schedule": "https://www.krg.nsw.gov.au/ocapi/Public/myarea/wasteservices?geolocationid={}&ocsvclang=en-AU",
  37 }
  38 
  39 HEADERS = {
  40     "user-agent": "Mozilla/5.0",
  41 }
  42 
  43 ICON_MAP = {
  44     "GeneralWaste": "mdi:trash-can",
  45     "Recycling": "mdi:recycle",
  46     "GreenWaste": "mdi:leaf",
  47 }
  48 
  49 ROUNDS = {
  50     "GeneralWaste": "General Waste",
  51     "Recycling": "Recycling",
  52     "GreenWaste": "Green Waste",
  53 }
  54 
  55 # _LOGGER = logging.getLogger(__name__)
  56 
  57 
  58 class Source:
  59     def __init__(
  60         self, post_code: str, suburb: str, street_name: str, street_number: str
  61     ):
  62         self.post_code = post_code
  63         self.suburb = suburb.upper()
  64         self.street_name = street_name
  65         self.street_number = street_number
  66 
  67     def fetch(self):
  68 
  69         locationId = 0
  70 
  71         # 'collection' api call seems to require an ASP.Net_sessionID, so obtain the relevant cookie
  72         s = requests.Session()
  73         q = requote_uri(str(API_URLS["session"]))
  74         r0 = s.get(q, headers = HEADERS)
  75 
  76         # Do initial address search
  77         address = "{} {}, {} NSW {}".format(self.street_number, self.street_name, self.suburb, self.post_code)
  78         q = requote_uri(str(API_URLS["search"]).format(address))
  79         r1 = s.get(q, headers = HEADERS)
  80         data = json.loads(r1.text)
  81 
  82         # Find the geolocation for the address
  83         for item in data["Items"]:
  84             if address in item['AddressSingleLine']:
  85                 locationId = item["Id"]
  86             break
  87 
  88         if locationId == 0:
  89             return []
  90 
  91         # Retrieve the upcoming collections for location
  92         q = requote_uri(str(API_URLS["schedule"]).format(locationId))
  93         r2 = s.get(q, headers = HEADERS)
  94         data = json.loads(r2.text)
  95         responseContent = data["responseContent"]
  96 
  97         soup = BeautifulSoup(responseContent, "html.parser")
  98         services = soup.find_all("article")
  99         
  100         entries = []
  101 
  102         for item in services:
  103             waste_type = item.find('h3').text
  104             date = datetime.datetime.strptime(item.find('div', {'class': 'next-service'}).text.strip(), "%a %d/%m/%Y").date()
  105             entries.append(
  106                 Collection(
  107                     date = date,
  108                     # t=waste_type,  # api returns GeneralWaste, Recycling, GreenWaste 
  109                     t = ROUNDS.get(waste_type),  # returns user-friendly General Waste, Recycling, Green Waste
  110                     icon=ICON_MAP.get(waste_type),
  111                 )
  112             )
  113 
  114         return entries
  115
  ```
  --- END FILES ---
  
  Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.
  
  Here is an example:
  
  ```diff
  diff --git a/examples/server_async.py b/examples/server_async.py
  --- a/examples/server_async.py
  +++ b/examples/server_async.py
  @@ -313,4 +313,4 @@
   
   
   if __name__ == "__main__":
  -    asyncio.run(run_async_server("."), debug=True)
  +    asyncio.run(run_async_server(), debug=True)
  diff --git a/examples/server_sync.py b/examples/server_sync.py
  --- a/examples/server_sync.py
  +++ b/examples/server_sync.py
  @@ -313,5 +313,5 @@
   
   
   if __name__ == "__main__":
  -    server = run_sync_server(".")
  +    server = run_sync_server()
       server.shutdown()
  
  ```
  
golden_diff: diff --git a/custom_components/waste_collection_schedule/waste_collection_schedule/source/kuringgai_nsw_gov_au.py b/custom_components/waste_collection_schedule/waste_collection_schedule/source/kuringgai_nsw_gov_au.py
  --- a/custom_components/waste_collection_schedule/waste_collection_schedule/source/kuringgai_nsw_gov_au.py
  +++ b/custom_components/waste_collection_schedule/waste_collection_schedule/source/kuringgai_nsw_gov_au.py
  @@ -28,8 +28,21 @@
           "street_name": "Kitchener Street",
           "street_number": "99/2-8",
       },
  +    "1 Latona St": {
  +        "post_code": "2073",
  +        "suburb": "PYMBLE",
  +        "street_name": "Latona Street",
  +        "street_number": "1",
  +    },
  +    "1A Latona St": {
  +        "post_code": "2073",
  +        "suburb": "PYMBLE",
  +        "street_name": "Latona Street",
  +        "street_number": "1A",
  +    },
   }
   
  +
   API_URLS = {
       "session":"https://www.krg.nsw.gov.au" ,
       "search": "https://www.krg.nsw.gov.au/api/v1/myarea/search?keywords={}",
  @@ -77,16 +90,12 @@
           address = "{} {}, {} NSW {}".format(self.street_number, self.street_name, self.suburb, self.post_code)
           q = requote_uri(str(API_URLS["search"]).format(address))
           r1 = s.get(q, headers = HEADERS)
  -        data = json.loads(r1.text)
  +        data = json.loads(r1.text)["Items"]
   
           # Find the geolocation for the address
  -        for item in data["Items"]:
  +        for item in data:
               if address in item['AddressSingleLine']:
                   locationId = item["Id"]
  -            break
  -
  -        if locationId == 0:
  -            return []
   
           # Retrieve the upcoming collections for location
           q = requote_uri(str(API_URLS["schedule"]).format(locationId))
  
verification_info: {"golden_diff": "diff --git a/custom_components/waste_collection_schedule/waste_collection_schedule/source/kuringgai_nsw_gov_au.py b/custom_components/waste_collection_schedule/waste_collection_schedule/source/kuringgai_nsw_gov_au.py\n--- a/custom_components/waste_collection_schedule/waste_collection_schedule/source/kuringgai_nsw_gov_au.py\n+++ b/custom_components/waste_collection_schedule/waste_collection_schedule/source/kuringgai_nsw_gov_au.py\n@@ -28,8 +28,21 @@\n         \"street_name\": \"Kitchener Street\",\n         \"street_number\": \"99/2-8\",\n     },\n+    \"1 Latona St\": {\n+        \"post_code\": \"2073\",\n+        \"suburb\": \"PYMBLE\",\n+        \"street_name\": \"Latona Street\",\n+        \"street_number\": \"1\",\n+    },\n+    \"1A Latona St\": {\n+        \"post_code\": \"2073\",\n+        \"suburb\": \"PYMBLE\",\n+        \"street_name\": \"Latona Street\",\n+        \"street_number\": \"1A\",\n+    },\n }\n \n+\n API_URLS = {\n     \"session\":\"https://www.krg.nsw.gov.au\" ,\n     \"search\": \"https://www.krg.nsw.gov.au/api/v1/myarea/search?keywords={}\",\n@@ -77,16 +90,12 @@\n         address = \"{} {}, {} NSW {}\".format(self.street_number, self.street_name, self.suburb, self.post_code)\n         q = requote_uri(str(API_URLS[\"search\"]).format(address))\n         r1 = s.get(q, headers = HEADERS)\n-        data = json.loads(r1.text)\n+        data = json.loads(r1.text)[\"Items\"]\n \n         # Find the geolocation for the address\n-        for item in data[\"Items\"]:\n+        for item in data:\n             if address in item['AddressSingleLine']:\n                 locationId = item[\"Id\"]\n-            break\n-\n-        if locationId == 0:\n-            return []\n \n         # Retrieve the upcoming collections for location\n         q = requote_uri(str(API_URLS[\"schedule\"]).format(locationId))\n", "issue": "Ku-ring-gai Council doesn't work if there is a house number 1A\nworks - 1A Latona Street PYMBLE 2073\r\ndoesn't work - 1 Latona Street PYMBLE 2073\r\n\r\nBoth exist\n", "before_files": [{"content": "import datetime\nimport json\nimport requests\n\nfrom bs4 import BeautifulSoup\nfrom requests.utils import requote_uri\nfrom waste_collection_schedule import Collection\n\nTITLE = \"Ku-ring-gai Council\"\nDESCRIPTION = \"Source for Ku-ring-gai Council waste collection.\"\nURL = \"https://www.krg.nsw.gov.au\"\nTEST_CASES = {\n    \"randomHouse\": {\n        \"post_code\": \"2070\",\n        \"suburb\": \"LINDFIELD\",\n        \"street_name\": \"Wolseley Road\",\n        \"street_number\": \"42\",\n    },\n    \"randomAppartment\": {\n        \"post_code\": \"2074\",\n        \"suburb\": \"WARRAWEE\",\n        \"street_name\": \"Cherry Street\",\n        \"street_number\": \"4/9\",\n    },\n    \"randomMultiunit\": {\n        \"post_code\": \"2075\",\n        \"suburb\": \"ST IVES\",\n        \"street_name\": \"Kitchener Street\",\n        \"street_number\": \"99/2-8\",\n    },\n}\n\nAPI_URLS = {\n    \"session\":\"https://www.krg.nsw.gov.au\" ,\n    \"search\": \"https://www.krg.nsw.gov.au/api/v1/myarea/search?keywords={}\",\n    \"schedule\": \"https://www.krg.nsw.gov.au/ocapi/Public/myarea/wasteservices?geolocationid={}&ocsvclang=en-AU\",\n}\n\nHEADERS = {\n    \"user-agent\": \"Mozilla/5.0\",\n}\n\nICON_MAP = {\n    \"GeneralWaste\": \"mdi:trash-can\",\n    \"Recycling\": \"mdi:recycle\",\n    \"GreenWaste\": \"mdi:leaf\",\n}\n\nROUNDS = {\n    \"GeneralWaste\": \"General Waste\",\n    \"Recycling\": \"Recycling\",\n    \"GreenWaste\": \"Green Waste\",\n}\n\n# _LOGGER = logging.getLogger(__name__)\n\n\nclass Source:\n    def __init__(\n        self, post_code: str, suburb: str, street_name: str, street_number: str\n    ):\n        self.post_code = post_code\n        self.suburb = suburb.upper()\n        self.street_name = street_name\n        self.street_number = street_number\n\n    def fetch(self):\n\n        locationId = 0\n\n        # 'collection' api call seems to require an ASP.Net_sessionID, so obtain the relevant cookie\n        s = requests.Session()\n        q = requote_uri(str(API_URLS[\"session\"]))\n        r0 = s.get(q, headers = HEADERS)\n\n        # Do initial address search\n        address = \"{} {}, {} NSW {}\".format(self.street_number, self.street_name, self.suburb, self.post_code)\n        q = requote_uri(str(API_URLS[\"search\"]).format(address))\n        r1 = s.get(q, headers = HEADERS)\n        data = json.loads(r1.text)\n\n        # Find the geolocation for the address\n        for item in data[\"Items\"]:\n            if address in item['AddressSingleLine']:\n                locationId = item[\"Id\"]\n            break\n\n        if locationId == 0:\n            return []\n\n        # Retrieve the upcoming collections for location\n        q = requote_uri(str(API_URLS[\"schedule\"]).format(locationId))\n        r2 = s.get(q, headers = HEADERS)\n        data = json.loads(r2.text)\n        responseContent = data[\"responseContent\"]\n\n        soup = BeautifulSoup(responseContent, \"html.parser\")\n        services = soup.find_all(\"article\")\n        \n        entries = []\n\n        for item in services:\n            waste_type = item.find('h3').text\n            date = datetime.datetime.strptime(item.find('div', {'class': 'next-service'}).text.strip(), \"%a %d/%m/%Y\").date()\n            entries.append(\n                Collection(\n                    date = date,\n                    # t=waste_type,  # api returns GeneralWaste, Recycling, GreenWaste \n                    t = ROUNDS.get(waste_type),  # returns user-friendly General Waste, Recycling, Green Waste\n                    icon=ICON_MAP.get(waste_type),\n                )\n            )\n\n        return entries\n", "path": "custom_components/waste_collection_schedule/waste_collection_schedule/source/kuringgai_nsw_gov_au.py"}], "after_files": [{"content": "import datetime\nimport json\nimport requests\n\nfrom bs4 import BeautifulSoup\nfrom requests.utils import requote_uri\nfrom waste_collection_schedule import Collection\n\nTITLE = \"Ku-ring-gai Council\"\nDESCRIPTION = \"Source for Ku-ring-gai Council waste collection.\"\nURL = \"https://www.krg.nsw.gov.au\"\nTEST_CASES = {\n    \"randomHouse\": {\n        \"post_code\": \"2070\",\n        \"suburb\": \"LINDFIELD\",\n        \"street_name\": \"Wolseley Road\",\n        \"street_number\": \"42\",\n    },\n    \"randomAppartment\": {\n        \"post_code\": \"2074\",\n        \"suburb\": \"WARRAWEE\",\n        \"street_name\": \"Cherry Street\",\n        \"street_number\": \"4/9\",\n    },\n    \"randomMultiunit\": {\n        \"post_code\": \"2075\",\n        \"suburb\": \"ST IVES\",\n        \"street_name\": \"Kitchener Street\",\n        \"street_number\": \"99/2-8\",\n    },\n    \"1 Latona St\": {\n        \"post_code\": \"2073\",\n        \"suburb\": \"PYMBLE\",\n        \"street_name\": \"Latona Street\",\n        \"street_number\": \"1\",\n    },\n    \"1A Latona St\": {\n        \"post_code\": \"2073\",\n        \"suburb\": \"PYMBLE\",\n        \"street_name\": \"Latona Street\",\n        \"street_number\": \"1A\",\n    },\n}\n\n\nAPI_URLS = {\n    \"session\":\"https://www.krg.nsw.gov.au\" ,\n    \"search\": \"https://www.krg.nsw.gov.au/api/v1/myarea/search?keywords={}\",\n    \"schedule\": \"https://www.krg.nsw.gov.au/ocapi/Public/myarea/wasteservices?geolocationid={}&ocsvclang=en-AU\",\n}\n\nHEADERS = {\n    \"user-agent\": \"Mozilla/5.0\",\n}\n\nICON_MAP = {\n    \"GeneralWaste\": \"mdi:trash-can\",\n    \"Recycling\": \"mdi:recycle\",\n    \"GreenWaste\": \"mdi:leaf\",\n}\n\nROUNDS = {\n    \"GeneralWaste\": \"General Waste\",\n    \"Recycling\": \"Recycling\",\n    \"GreenWaste\": \"Green Waste\",\n}\n\n# _LOGGER = logging.getLogger(__name__)\n\n\nclass Source:\n    def __init__(\n        self, post_code: str, suburb: str, street_name: str, street_number: str\n    ):\n        self.post_code = post_code\n        self.suburb = suburb.upper()\n        self.street_name = street_name\n        self.street_number = street_number\n\n    def fetch(self):\n\n        locationId = 0\n\n        # 'collection' api call seems to require an ASP.Net_sessionID, so obtain the relevant cookie\n        s = requests.Session()\n        q = requote_uri(str(API_URLS[\"session\"]))\n        r0 = s.get(q, headers = HEADERS)\n\n        # Do initial address search\n        address = \"{} {}, {} NSW {}\".format(self.street_number, self.street_name, self.suburb, self.post_code)\n        q = requote_uri(str(API_URLS[\"search\"]).format(address))\n        r1 = s.get(q, headers = HEADERS)\n        data = json.loads(r1.text)[\"Items\"]\n\n        # Find the geolocation for the address\n        for item in data:\n            if address in item['AddressSingleLine']:\n                locationId = item[\"Id\"]\n\n        # Retrieve the upcoming collections for location\n        q = requote_uri(str(API_URLS[\"schedule\"]).format(locationId))\n        r2 = s.get(q, headers = HEADERS)\n        data = json.loads(r2.text)\n        responseContent = data[\"responseContent\"]\n\n        soup = BeautifulSoup(responseContent, \"html.parser\")\n        services = soup.find_all(\"article\")\n        \n        entries = []\n\n        for item in services:\n            waste_type = item.find('h3').text\n            date = datetime.datetime.strptime(item.find('div', {'class': 'next-service'}).text.strip(), \"%a %d/%m/%Y\").date()\n            entries.append(\n                Collection(\n                    date = date,\n                    # t=waste_type,  # api returns GeneralWaste, Recycling, GreenWaste \n                    t = ROUNDS.get(waste_type),  # returns user-friendly General Waste, Recycling, Green Waste\n                    icon=ICON_MAP.get(waste_type),\n                )\n            )\n\n        return entries\n", "path": "custom_components/waste_collection_schedule/waste_collection_schedule/source/kuringgai_nsw_gov_au.py"}]}