prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Wendy's incorrect hours
  ATP populates incorrect hours for Wendy's. It's populating 10:30 when [the Wendy's website](https://locations.wendys.com/united-states/oh/loveland/10601-loveland-madeira-rd) says 12:00am. Reference [OSM Changeset 151311478](https://www.openstreetmap.org/changeset/151311478#map=6/41.675/-77.593). I assume it has to do with parsing multiple blocks of hours on the same page. In this case, the web page lists restaurant hours and drive through hours, with an extra blurb about breakfast ending at 10:30 am, which I assume is where the 10:30 is coming from in the OSM import.
  
  </issue>
  <code>
  [start of locations/spiders/wendys.py]
  1 from scrapy.spiders import SitemapSpider
  2 
  3 from locations.structured_data_spider import StructuredDataSpider
  4 
  5 
  6 class WendysSpider(SitemapSpider, StructuredDataSpider):
  7     name = "wendys"
  8     item_attributes = {"brand": "Wendy's", "brand_wikidata": "Q550258"}
  9     sitemap_urls = ["https://locations.wendys.com/sitemap.xml"]
  10     sitemap_rules = [(r"https://locations.wendys.com/.+/\w\w/.+/.+", "parse_sd")]
  11
  [end of locations/spiders/wendys.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/locations/spiders/wendys.py b/locations/spiders/wendys.py
  --- a/locations/spiders/wendys.py
  +++ b/locations/spiders/wendys.py
  @@ -1,10 +1,48 @@
  +import json
  +
   from scrapy.spiders import SitemapSpider
   
  +from locations.hours import OpeningHours
   from locations.structured_data_spider import StructuredDataSpider
   
   
   class WendysSpider(SitemapSpider, StructuredDataSpider):
       name = "wendys"
       item_attributes = {"brand": "Wendy's", "brand_wikidata": "Q550258"}
  +    wanted_types = ["FastFoodRestaurant"]
       sitemap_urls = ["https://locations.wendys.com/sitemap.xml"]
       sitemap_rules = [(r"https://locations.wendys.com/.+/\w\w/.+/.+", "parse_sd")]
  +
  +    def post_process_item(self, item, response, ld_data, **kwargs):
  +        item["website"] = ld_data.get("url")
  +
  +        # Opening hours for the drive-through seem to get included with regular hours, so clean that up
  +        opening_hours_divs = response.xpath('//div[@class="c-location-hours-details-wrapper js-location-hours"]')
  +        item["opening_hours"] = self.clean_hours(opening_hours_divs[0])
  +
  +        if len(opening_hours_divs) > 1:
  +            item["extras"]["opening_hours:drive_through"] = self.clean_hours(opening_hours_divs[1])
  +
  +        if breakfast_hours_divs := response.xpath(
  +            '//div[@class="LocationInfo-breakfastInfo js-breakfastInfo"]/span[@class="c-location-hours-today js-location-hours"]'
  +        ):
  +            item["extras"]["breakfast"] = self.clean_hours(breakfast_hours_divs[0])
  +
  +        yield item
  +
  +    @staticmethod
  +    def clean_hours(hours_div):
  +        days = hours_div.xpath(".//@data-days").extract_first()
  +        days = json.loads(days)
  +
  +        oh = OpeningHours()
  +
  +        for day in days:
  +            for interval in day["intervals"]:
  +                # These interval ranges are 24 hour times represented as integers, so they need to be converted to strings
  +                open_time = str(interval["start"]).zfill(4)
  +                close_time = str(interval["end"]).zfill(4)
  +
  +                oh.add_range(day=day["day"].title()[:2], open_time=open_time, close_time=close_time, time_format="%H%M")
  +
  +        return oh.as_opening_hours()
  
verification_info: {"golden_diff": "diff --git a/locations/spiders/wendys.py b/locations/spiders/wendys.py\n--- a/locations/spiders/wendys.py\n+++ b/locations/spiders/wendys.py\n@@ -1,10 +1,48 @@\n+import json\n+\n from scrapy.spiders import SitemapSpider\n \n+from locations.hours import OpeningHours\n from locations.structured_data_spider import StructuredDataSpider\n \n \n class WendysSpider(SitemapSpider, StructuredDataSpider):\n     name = \"wendys\"\n     item_attributes = {\"brand\": \"Wendy's\", \"brand_wikidata\": \"Q550258\"}\n+    wanted_types = [\"FastFoodRestaurant\"]\n     sitemap_urls = [\"https://locations.wendys.com/sitemap.xml\"]\n     sitemap_rules = [(r\"https://locations.wendys.com/.+/\\w\\w/.+/.+\", \"parse_sd\")]\n+\n+    def post_process_item(self, item, response, ld_data, **kwargs):\n+        item[\"website\"] = ld_data.get(\"url\")\n+\n+        # Opening hours for the drive-through seem to get included with regular hours, so clean that up\n+        opening_hours_divs = response.xpath('//div[@class=\"c-location-hours-details-wrapper js-location-hours\"]')\n+        item[\"opening_hours\"] = self.clean_hours(opening_hours_divs[0])\n+\n+        if len(opening_hours_divs) > 1:\n+            item[\"extras\"][\"opening_hours:drive_through\"] = self.clean_hours(opening_hours_divs[1])\n+\n+        if breakfast_hours_divs := response.xpath(\n+            '//div[@class=\"LocationInfo-breakfastInfo js-breakfastInfo\"]/span[@class=\"c-location-hours-today js-location-hours\"]'\n+        ):\n+            item[\"extras\"][\"breakfast\"] = self.clean_hours(breakfast_hours_divs[0])\n+\n+        yield item\n+\n+    @staticmethod\n+    def clean_hours(hours_div):\n+        days = hours_div.xpath(\".//@data-days\").extract_first()\n+        days = json.loads(days)\n+\n+        oh = OpeningHours()\n+\n+        for day in days:\n+            for interval in day[\"intervals\"]:\n+                # These interval ranges are 24 hour times represented as integers, so they need to be converted to strings\n+                open_time = str(interval[\"start\"]).zfill(4)\n+                close_time = str(interval[\"end\"]).zfill(4)\n+\n+                oh.add_range(day=day[\"day\"].title()[:2], open_time=open_time, close_time=close_time, time_format=\"%H%M\")\n+\n+        return oh.as_opening_hours()\n", "issue": "Wendy's incorrect hours\nATP populates incorrect hours for Wendy's. It's populating 10:30 when [the Wendy's website](https://locations.wendys.com/united-states/oh/loveland/10601-loveland-madeira-rd) says 12:00am. Reference [OSM Changeset 151311478](https://www.openstreetmap.org/changeset/151311478#map=6/41.675/-77.593). I assume it has to do with parsing multiple blocks of hours on the same page. In this case, the web page lists restaurant hours and drive through hours, with an extra blurb about breakfast ending at 10:30 am, which I assume is where the 10:30 is coming from in the OSM import.\n", "before_files": [{"content": "from scrapy.spiders import SitemapSpider\n\nfrom locations.structured_data_spider import StructuredDataSpider\n\n\nclass WendysSpider(SitemapSpider, StructuredDataSpider):\n    name = \"wendys\"\n    item_attributes = {\"brand\": \"Wendy's\", \"brand_wikidata\": \"Q550258\"}\n    sitemap_urls = [\"https://locations.wendys.com/sitemap.xml\"]\n    sitemap_rules = [(r\"https://locations.wendys.com/.+/\\w\\w/.+/.+\", \"parse_sd\")]\n", "path": "locations/spiders/wendys.py"}]}