prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Add StadtService Brühl
  Add Source for StadtService Brühl
  
  Update stadtservice_bruehl_de.md
  
  </issue>
  <code>
  [start of custom_components/waste_collection_schedule/waste_collection_schedule/source/stadtservice_bruehl_de.py]
  1 import datetime
  2 import logging
  3 
  4 import requests
  5 from bs4 import BeautifulSoup
  6 from waste_collection_schedule import Collection  # type: ignore[attr-defined]
  7 from waste_collection_schedule.service.ICS import ICS
  8 
  9 TITLE = "StadtService Brühl"
  10 DESCRIPTION = "Source für Abfallkalender StadtService Brühl"
  11 URL = "https://stadtservice-bruehl.de"
  12 TEST_CASES = {"TEST1": {"strasse": "Badorfer Straße", "hnr": "1"}}
  13 
  14 _LOGGER = logging.getLogger(__name__)
  15 
  16 
  17 class Source:
  18     def __init__(self, strasse, hnr):
  19         self._strasse = strasse
  20         self._hnr = hnr
  21         self._ics = ICS()
  22 
  23     def fetch(self):
  24 
  25         today = datetime.date.today()
  26         year = today.year
  27         # Get District
  28         data = {
  29             "street": self._strasse,
  30             "street_number": self._hnr,
  31             "send_street_and_nummber_data": "",
  32         }
  33 
  34         r = requests.post(
  35             "https://services.stadtservice-bruehl.de/abfallkalender/", data=data
  36         )
  37         r.raise_for_status()
  38 
  39         soup = BeautifulSoup(r.text, "html.parser")
  40 
  41         for tag in soup.find_all("input", type="hidden"):
  42             # print(tag["name"])
  43             # print(tag["value"])
  44             if tag["name"] == "post_district":
  45                 post_district = tag["value"]
  46 
  47         if post_district == "":
  48             raise Exception("Unable to get district")
  49 
  50         # print(post_district);
  51         # Get ICAL
  52         data = {
  53             "post_year": year,
  54             "post_district": post_district,
  55             "post_street_name": self._strasse,
  56             "post_street_number": self._hnr,
  57             "checked_waste_type_hausmuell": "on",
  58             "checked_waste_type_gelber_sack": "on",
  59             "checked_waste_type_altpapier": "on",
  60             "checked_waste_type_bio": "on",
  61             "checked_waste_type_weihnachtsbaeume": "on",
  62             "checked_waste_type_strassenlaub": "on",
  63             "form_page_id": "9",
  64             "reminder_time": "8",
  65             "send_ics_download_configurator_data": "",
  66         }
  67 
  68         r = requests.post(
  69             "https://services.stadtservice-bruehl.de/abfallkalender/individuellen-abfuhrkalender-herunterladen/",
  70             data=data,
  71         )
  72         r.raise_for_status()
  73 
  74         dates = self._ics.convert(r.text)
  75 
  76         entries = []
  77         for d in dates:
  78             entries.append(Collection(d[0], d[1]))
  79 
  80         return entries
  81
  [end of custom_components/waste_collection_schedule/waste_collection_schedule/source/stadtservice_bruehl_de.py]
  </code>
  
  I need you to solve this issue by generating a single patch file that I can apply directly to this repository using git apply. Please respond with a single patch file in the following format.
  <patch>
  diff --git a/file.py b/file.py
  --- a/file.py
  +++ b/file.py
  @@ -1,27 +1,35 @@
   def euclidean(a, b):
  -    while b:
  -        a, b = b, a % b
  -    return a
  +    if b == 0:
  +        return a
  +    return euclidean(b, a % b)
   
   
   def bresenham(x0, y0, x1, y1):
       points = []
       dx = abs(x1 - x0)
       dy = abs(y1 - y0)
  -    sx = 1 if x0 < x1 else -1
  -    sy = 1 if y0 < y1 else -1
  -    err = dx - dy
  +    x, y = x0, y0
  +    sx = -1 if x0 > x1 else 1
  +    sy = -1 if y0 > y1 else 1
   
  -    while True:
  -        points.append((x0, y0))
  -        if x0 == x1 and y0 == y1:
  -            break
  -        e2 = 2 * err
  -        if e2 > -dy:
  -            err -= dy
  -            x0 += sx
  -        if e2 < dx:
  -            err += dx
  -            y0 += sy
  +    if dx > dy:
  +        err = dx / 2.0
  +        while x != x1:
  +            points.append((x, y))
  +            err -= dy
  +            if err < 0:
  +                y += sy
  +                err += dx
  +            x += sx
  +    else:
  +        err = dy / 2.0
  +        while y != y1:
  +            points.append((x, y))
  +            err -= dx
  +            if err < 0:
  +                x += sx
  +                err += dy
  +            y += sy
  +
  +    points.append((x, y))
       return points
  
  </patch>
golden_diff: diff --git a/custom_components/waste_collection_schedule/waste_collection_schedule/source/stadtservice_bruehl_de.py b/custom_components/waste_collection_schedule/waste_collection_schedule/source/stadtservice_bruehl_de.py
  --- a/custom_components/waste_collection_schedule/waste_collection_schedule/source/stadtservice_bruehl_de.py
  +++ b/custom_components/waste_collection_schedule/waste_collection_schedule/source/stadtservice_bruehl_de.py
  @@ -18,7 +18,7 @@
       def __init__(self, strasse, hnr):
           self._strasse = strasse
           self._hnr = hnr
  -        self._ics = ICS()
  +        self._ics = ICS(regex="(.*?) \\- ", split_at=", ")
   
       def fetch(self):
  
verification_info: {"golden_diff": "diff --git a/custom_components/waste_collection_schedule/waste_collection_schedule/source/stadtservice_bruehl_de.py b/custom_components/waste_collection_schedule/waste_collection_schedule/source/stadtservice_bruehl_de.py\n--- a/custom_components/waste_collection_schedule/waste_collection_schedule/source/stadtservice_bruehl_de.py\n+++ b/custom_components/waste_collection_schedule/waste_collection_schedule/source/stadtservice_bruehl_de.py\n@@ -18,7 +18,7 @@\n     def __init__(self, strasse, hnr):\n         self._strasse = strasse\n         self._hnr = hnr\n-        self._ics = ICS()\n+        self._ics = ICS(regex=\"(.*?) \\\\- \", split_at=\", \")\n \n     def fetch(self):\n", "issue": "Add StadtService Br\u00fchl\nAdd Source for StadtService Br\u00fchl\r\n\r\nUpdate stadtservice_bruehl_de.md\n", "before_files": [{"content": "import datetime\nimport logging\n\nimport requests\nfrom bs4 import BeautifulSoup\nfrom waste_collection_schedule import Collection  # type: ignore[attr-defined]\nfrom waste_collection_schedule.service.ICS import ICS\n\nTITLE = \"StadtService Br\u00fchl\"\nDESCRIPTION = \"Source f\u00fcr Abfallkalender StadtService Br\u00fchl\"\nURL = \"https://stadtservice-bruehl.de\"\nTEST_CASES = {\"TEST1\": {\"strasse\": \"Badorfer Stra\u00dfe\", \"hnr\": \"1\"}}\n\n_LOGGER = logging.getLogger(__name__)\n\n\nclass Source:\n    def __init__(self, strasse, hnr):\n        self._strasse = strasse\n        self._hnr = hnr\n        self._ics = ICS()\n\n    def fetch(self):\n\n        today = datetime.date.today()\n        year = today.year\n        # Get District\n        data = {\n            \"street\": self._strasse,\n            \"street_number\": self._hnr,\n            \"send_street_and_nummber_data\": \"\",\n        }\n\n        r = requests.post(\n            \"https://services.stadtservice-bruehl.de/abfallkalender/\", data=data\n        )\n        r.raise_for_status()\n\n        soup = BeautifulSoup(r.text, \"html.parser\")\n\n        for tag in soup.find_all(\"input\", type=\"hidden\"):\n            # print(tag[\"name\"])\n            # print(tag[\"value\"])\n            if tag[\"name\"] == \"post_district\":\n                post_district = tag[\"value\"]\n\n        if post_district == \"\":\n            raise Exception(\"Unable to get district\")\n\n        # print(post_district);\n        # Get ICAL\n        data = {\n            \"post_year\": year,\n            \"post_district\": post_district,\n            \"post_street_name\": self._strasse,\n            \"post_street_number\": self._hnr,\n            \"checked_waste_type_hausmuell\": \"on\",\n            \"checked_waste_type_gelber_sack\": \"on\",\n            \"checked_waste_type_altpapier\": \"on\",\n            \"checked_waste_type_bio\": \"on\",\n            \"checked_waste_type_weihnachtsbaeume\": \"on\",\n            \"checked_waste_type_strassenlaub\": \"on\",\n            \"form_page_id\": \"9\",\n            \"reminder_time\": \"8\",\n            \"send_ics_download_configurator_data\": \"\",\n        }\n\n        r = requests.post(\n            \"https://services.stadtservice-bruehl.de/abfallkalender/individuellen-abfuhrkalender-herunterladen/\",\n            data=data,\n        )\n        r.raise_for_status()\n\n        dates = self._ics.convert(r.text)\n\n        entries = []\n        for d in dates:\n            entries.append(Collection(d[0], d[1]))\n\n        return entries\n", "path": "custom_components/waste_collection_schedule/waste_collection_schedule/source/stadtservice_bruehl_de.py"}]}