prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  Error with Service Provider Stadtreinigung Leipzig / stadtreinigung-leipzig.de
  Hi everyone,
  Since 03.01.2023 (this is where I noticed it), WCS can no longer retrieve data from Stadtwerke Leipzig.
  The following error is displayed:
  
  fetch failed for source Stadtreinigung Leipzig: Traceback (most recent call last): File "/config/custom_components/waste_collection_schedule/waste_collection_schedule/source_shell.py", line 134, in fetch entries = self._source.fetch() File "/config/custom_components/waste_collection_schedule/waste_collection_schedule/source/stadtreinigung_leipzig_de.py", line 34, in fetch raise Exception(f"street not found: {self._street}") Exception: street not found: Pflugkstraße
  
  My configuration.yaml:
  waste_collection_schedule:
    sources:
      - name: stadtreinigung_leipzig_de
        args:
          street: Pflugkstraße
          house_number: 1
        calendar_title: Abfallkalender
  
  I've been trying around here for a few days, but I can't find a solution to the problem. Is it possible that the API has been changed/defective?
  Thanks for your help...
  
  --- 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/stadtreinigung_leipzig_de.py`
  Content:
  ```
  1 import json
  2 import logging
  3 
  4 import requests
  5 from waste_collection_schedule import Collection  # type: ignore[attr-defined]
  6 from waste_collection_schedule.service.ICS import ICS
  7 
  8 _LOGGER = logging.getLogger(__name__)
  9 
  10 TITLE = "Stadtreinigung Leipzig"
  11 DESCRIPTION = "Source for Stadtreinigung Leipzig."
  12 URL = "https://stadtreinigung-leipzig.de"
  13 TEST_CASES = {"Bahnhofsallee": {"street": "Bahnhofsallee", "house_number": 7}}
  14 
  15 
  16 class Source:
  17     def __init__(self, street, house_number):
  18         self._street = street
  19         self._house_number = house_number
  20         self._ics = ICS()
  21 
  22     def fetch(self):
  23         params = {
  24             "name": self._street,
  25         }
  26 
  27         # get list of streets and house numbers
  28         r = requests.get(
  29             "https://stadtreinigung-leipzig.de/rest/wastecalendarstreets", params=params
  30         )
  31 
  32         data = json.loads(r.text)
  33         if len(data["results"]) == 0:
  34             raise Exception(f"street not found: {self._street}")
  35         street_entry = data["results"].get(self._street)
  36         if street_entry is None:
  37             raise Exception(f"street not found: {self._street}")
  38 
  39         id = street_entry.get(str(self._house_number))
  40         if id is None:
  41             raise Exception(f"house_number not found: {self._house_number}")
  42 
  43         # get ics file
  44         params = {
  45             "position_nos": id,
  46         }
  47         r = requests.get(
  48             "https://stadtreinigung-leipzig.de/wir-kommen-zu-ihnen/abfallkalender/ical.ics",
  49             params=params,
  50         )
  51         dates = self._ics.convert(r.text)
  52 
  53         entries = []
  54         for d in dates:
  55             entries.append(Collection(d[0], d[1].removesuffix(", ")))
  56         return entries
  57
  ```
  --- 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/stadtreinigung_leipzig_de.py b/custom_components/waste_collection_schedule/waste_collection_schedule/source/stadtreinigung_leipzig_de.py
  --- a/custom_components/waste_collection_schedule/waste_collection_schedule/source/stadtreinigung_leipzig_de.py
  +++ b/custom_components/waste_collection_schedule/waste_collection_schedule/source/stadtreinigung_leipzig_de.py
  @@ -21,12 +21,13 @@
   
       def fetch(self):
           params = {
  -            "name": self._street,
  +            "old_format": 1,
  +            "search": self._street,
           }
   
           # get list of streets and house numbers
           r = requests.get(
  -            "https://stadtreinigung-leipzig.de/rest/wastecalendarstreets", params=params
  +            "https://stadtreinigung-leipzig.de/rest/Navision/Streets", params=params
           )
   
           data = json.loads(r.text)
  
verification_info: {"golden_diff": "diff --git a/custom_components/waste_collection_schedule/waste_collection_schedule/source/stadtreinigung_leipzig_de.py b/custom_components/waste_collection_schedule/waste_collection_schedule/source/stadtreinigung_leipzig_de.py\n--- a/custom_components/waste_collection_schedule/waste_collection_schedule/source/stadtreinigung_leipzig_de.py\n+++ b/custom_components/waste_collection_schedule/waste_collection_schedule/source/stadtreinigung_leipzig_de.py\n@@ -21,12 +21,13 @@\n \n     def fetch(self):\n         params = {\n-            \"name\": self._street,\n+            \"old_format\": 1,\n+            \"search\": self._street,\n         }\n \n         # get list of streets and house numbers\n         r = requests.get(\n-            \"https://stadtreinigung-leipzig.de/rest/wastecalendarstreets\", params=params\n+            \"https://stadtreinigung-leipzig.de/rest/Navision/Streets\", params=params\n         )\n \n         data = json.loads(r.text)\n", "issue": "Error with Service Provider Stadtreinigung Leipzig / stadtreinigung-leipzig.de\nHi everyone,\r\nSince 03.01.2023 (this is where I noticed it), WCS can no longer retrieve data from Stadtwerke Leipzig.\r\nThe following error is displayed:\r\n\r\nfetch failed for source Stadtreinigung Leipzig: Traceback (most recent call last): File \"/config/custom_components/waste_collection_schedule/waste_collection_schedule/source_shell.py\", line 134, in fetch entries = self._source.fetch() File \"/config/custom_components/waste_collection_schedule/waste_collection_schedule/source/stadtreinigung_leipzig_de.py\", line 34, in fetch raise Exception(f\"street not found: {self._street}\") Exception: street not found: Pflugkstra\u00dfe\r\n\r\nMy configuration.yaml:\r\nwaste_collection_schedule:\r\n  sources:\r\n    - name: stadtreinigung_leipzig_de\r\n      args:\r\n        street: Pflugkstra\u00dfe\r\n        house_number: 1\r\n      calendar_title: Abfallkalender\r\n\r\nI've been trying around here for a few days, but I can't find a solution to the problem. Is it possible that the API has been changed/defective?\r\nThanks for your help...\n", "before_files": [{"content": "import json\nimport logging\n\nimport requests\nfrom waste_collection_schedule import Collection  # type: ignore[attr-defined]\nfrom waste_collection_schedule.service.ICS import ICS\n\n_LOGGER = logging.getLogger(__name__)\n\nTITLE = \"Stadtreinigung Leipzig\"\nDESCRIPTION = \"Source for Stadtreinigung Leipzig.\"\nURL = \"https://stadtreinigung-leipzig.de\"\nTEST_CASES = {\"Bahnhofsallee\": {\"street\": \"Bahnhofsallee\", \"house_number\": 7}}\n\n\nclass Source:\n    def __init__(self, street, house_number):\n        self._street = street\n        self._house_number = house_number\n        self._ics = ICS()\n\n    def fetch(self):\n        params = {\n            \"name\": self._street,\n        }\n\n        # get list of streets and house numbers\n        r = requests.get(\n            \"https://stadtreinigung-leipzig.de/rest/wastecalendarstreets\", params=params\n        )\n\n        data = json.loads(r.text)\n        if len(data[\"results\"]) == 0:\n            raise Exception(f\"street not found: {self._street}\")\n        street_entry = data[\"results\"].get(self._street)\n        if street_entry is None:\n            raise Exception(f\"street not found: {self._street}\")\n\n        id = street_entry.get(str(self._house_number))\n        if id is None:\n            raise Exception(f\"house_number not found: {self._house_number}\")\n\n        # get ics file\n        params = {\n            \"position_nos\": id,\n        }\n        r = requests.get(\n            \"https://stadtreinigung-leipzig.de/wir-kommen-zu-ihnen/abfallkalender/ical.ics\",\n            params=params,\n        )\n        dates = self._ics.convert(r.text)\n\n        entries = []\n        for d in dates:\n            entries.append(Collection(d[0], d[1].removesuffix(\", \")))\n        return entries\n", "path": "custom_components/waste_collection_schedule/waste_collection_schedule/source/stadtreinigung_leipzig_de.py"}], "after_files": [{"content": "import json\nimport logging\n\nimport requests\nfrom waste_collection_schedule import Collection  # type: ignore[attr-defined]\nfrom waste_collection_schedule.service.ICS import ICS\n\n_LOGGER = logging.getLogger(__name__)\n\nTITLE = \"Stadtreinigung Leipzig\"\nDESCRIPTION = \"Source for Stadtreinigung Leipzig.\"\nURL = \"https://stadtreinigung-leipzig.de\"\nTEST_CASES = {\"Bahnhofsallee\": {\"street\": \"Bahnhofsallee\", \"house_number\": 7}}\n\n\nclass Source:\n    def __init__(self, street, house_number):\n        self._street = street\n        self._house_number = house_number\n        self._ics = ICS()\n\n    def fetch(self):\n        params = {\n            \"old_format\": 1,\n            \"search\": self._street,\n        }\n\n        # get list of streets and house numbers\n        r = requests.get(\n            \"https://stadtreinigung-leipzig.de/rest/Navision/Streets\", params=params\n        )\n\n        data = json.loads(r.text)\n        if len(data[\"results\"]) == 0:\n            raise Exception(f\"street not found: {self._street}\")\n        street_entry = data[\"results\"].get(self._street)\n        if street_entry is None:\n            raise Exception(f\"street not found: {self._street}\")\n\n        id = street_entry.get(str(self._house_number))\n        if id is None:\n            raise Exception(f\"house_number not found: {self._house_number}\")\n\n        # get ics file\n        params = {\n            \"position_nos\": id,\n        }\n        r = requests.get(\n            \"https://stadtreinigung-leipzig.de/wir-kommen-zu-ihnen/abfallkalender/ical.ics\",\n            params=params,\n        )\n        dates = self._ics.convert(r.text)\n\n        entries = []\n        for d in dates:\n            entries.append(Collection(d[0], d[1].removesuffix(\", \")))\n        return entries\n", "path": "custom_components/waste_collection_schedule/waste_collection_schedule/source/stadtreinigung_leipzig_de.py"}]}