prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Spider alnatura_de is broken
  During the global build at 2021-08-25-14-42-15, spider **alnatura_de** failed with **134 features** and **5 errors**.
  
  Here's [the log](https://data.alltheplaces.xyz/runs/2021-08-25-14-42-15/logs/alnatura_de.txt) and [the output](https://data.alltheplaces.xyz/runs/2021-08-25-14-42-15/output/alnatura_de.geojson) ([on a map](https://data.alltheplaces.xyz/map.html?show=https://data.alltheplaces.xyz/runs/2021-08-25-14-42-15/output/alnatura_de.geojson))
  
  </issue>
  <code>
  [start of locations/spiders/alnatura_de.py]
  1 import scrapy
  2 import re
  3 import json
  4 
  5 from locations.items import GeojsonPointItem
  6 from locations.hours import OpeningHours
  7 
  8 
  9 DAY_MAPPING = {
  10     1: 'Mo', 2: 'Tu', 3: 'We', 4: 'Th', 5: 'Fr', 6: 'Sa', 7: 'Su',
  11     'Mo': 1, 'Tu': 2, 'We': 3, 'Th': 4, 'Fr': 5, 'Sa': 6, 'Su': 7
  12 }
  13 
  14 
  15 class AlnaturaSpider(scrapy.Spider):
  16     name = "alnatura_de"
  17     allowed_domains = ["www.alnatura.de"]
  18     start_urls = (
  19         'https://www.alnatura.de/api/sitecore/stores/FindStoresforMap?'
  20         'ElementsPerPage=10000&lat=50.99820058296841'
  21         '&lng=7.811966062500009&radius=1483'
  22         '&Tradepartner=Alnatura%20Super%20Natur%20Markt',
  23     )
  24 
  25     def parse_hours(self, store_hours):
  26         opening_hours = OpeningHours()
  27         match = re.match(r'(.+?)-(.+?) +(\d.*?)-(.+?) Uhr', store_hours)
  28         if match:
  29             from_day = match.group(1).strip()
  30             to_day = match.group(2).strip()
  31             from_time = match.group(3).strip()
  32             to_time = match.group(4).strip()
  33 
  34             fhours = int(float(from_time))
  35             fminutes = (float(from_time) * 60) % 60
  36             fmt_from_time = "%d:%02d" % (fhours, fminutes)
  37             thours = int(float(to_time))
  38             tminutes = (float(to_time) * 60) % 60
  39             fmt_to_time = "%d:%02d" % (thours, tminutes)
  40 
  41         for day in range(DAY_MAPPING[from_day], DAY_MAPPING[to_day] + 1):
  42             opening_hours.add_range(
  43                 day=DAY_MAPPING[day],
  44                 open_time=fmt_from_time,
  45                 close_time=fmt_to_time,
  46                 time_format='%H:%M'
  47             )
  48 
  49         return opening_hours.as_opening_hours()
  50 
  51     def parse_stores(self, response):
  52         store = json.loads(response.text)
  53         store = store['Payload']
  54 
  55         properties = {
  56             'lat': response.meta.get('lat'),
  57             'lon': response.meta.get('lng'),
  58             'name': store['StoreName'],
  59             'street': store['Street'],
  60             'city': store['City'],
  61             'postcode': store['PostalCode'],
  62             'phone': store['Tel'],
  63             'country': store['Country'],
  64             'ref': response.meta.get('id'),
  65         }
  66 
  67         if store['OpeningTime']:
  68             hours = self.parse_hours(store.get('OpeningTime'))
  69             if hours:
  70                 properties["opening_hours"] = hours
  71 
  72         yield GeojsonPointItem(**properties)
  73 
  74     def parse(self, response):
  75         data = json.loads(response.text)
  76 
  77         for stores in data['Payload']:
  78             yield scrapy.Request(
  79                 f"https://www.alnatura.de/api/sitecore/stores/StoreDetails"
  80                 f"?storeid={stores['Id']}",
  81                 callback=self.parse_stores,
  82                 meta={
  83                     'lat': stores['Lat'].replace(',', '.'),
  84                     'lng': stores['Lng'].replace(',', '.'),
  85                     'id': stores['Id'],
  86                 }
  87             )
  88
  [end of locations/spiders/alnatura_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/locations/spiders/alnatura_de.py b/locations/spiders/alnatura_de.py
  --- a/locations/spiders/alnatura_de.py
  +++ b/locations/spiders/alnatura_de.py
  @@ -28,8 +28,8 @@
           if match:
               from_day = match.group(1).strip()
               to_day = match.group(2).strip()
  -            from_time = match.group(3).strip()
  -            to_time = match.group(4).strip()
  +            from_time = match.group(3).strip().replace(':','.')
  +            to_time = match.group(4).strip().replace(':','.')
   
               fhours = int(float(from_time))
               fminutes = (float(from_time) * 60) % 60
  @@ -38,13 +38,13 @@
               tminutes = (float(to_time) * 60) % 60
               fmt_to_time = "%d:%02d" % (thours, tminutes)
   
  -        for day in range(DAY_MAPPING[from_day], DAY_MAPPING[to_day] + 1):
  -            opening_hours.add_range(
  -                day=DAY_MAPPING[day],
  -                open_time=fmt_from_time,
  -                close_time=fmt_to_time,
  -                time_format='%H:%M'
  -            )
  +            for day in range(DAY_MAPPING[from_day], DAY_MAPPING[to_day] + 1):
  +                opening_hours.add_range(
  +                    day=DAY_MAPPING[day],
  +                    open_time=fmt_from_time,
  +                    close_time=fmt_to_time,
  +                    time_format='%H:%M'
  +                )
   
           return opening_hours.as_opening_hours()
  
verification_info: {"golden_diff": "diff --git a/locations/spiders/alnatura_de.py b/locations/spiders/alnatura_de.py\n--- a/locations/spiders/alnatura_de.py\n+++ b/locations/spiders/alnatura_de.py\n@@ -28,8 +28,8 @@\n         if match:\n             from_day = match.group(1).strip()\n             to_day = match.group(2).strip()\n-            from_time = match.group(3).strip()\n-            to_time = match.group(4).strip()\n+            from_time = match.group(3).strip().replace(':','.')\n+            to_time = match.group(4).strip().replace(':','.')\n \n             fhours = int(float(from_time))\n             fminutes = (float(from_time) * 60) % 60\n@@ -38,13 +38,13 @@\n             tminutes = (float(to_time) * 60) % 60\n             fmt_to_time = \"%d:%02d\" % (thours, tminutes)\n \n-        for day in range(DAY_MAPPING[from_day], DAY_MAPPING[to_day] + 1):\n-            opening_hours.add_range(\n-                day=DAY_MAPPING[day],\n-                open_time=fmt_from_time,\n-                close_time=fmt_to_time,\n-                time_format='%H:%M'\n-            )\n+            for day in range(DAY_MAPPING[from_day], DAY_MAPPING[to_day] + 1):\n+                opening_hours.add_range(\n+                    day=DAY_MAPPING[day],\n+                    open_time=fmt_from_time,\n+                    close_time=fmt_to_time,\n+                    time_format='%H:%M'\n+                )\n \n         return opening_hours.as_opening_hours()\n", "issue": "Spider alnatura_de is broken\nDuring the global build at 2021-08-25-14-42-15, spider **alnatura_de** failed with **134 features** and **5 errors**.\n\nHere's [the log](https://data.alltheplaces.xyz/runs/2021-08-25-14-42-15/logs/alnatura_de.txt) and [the output](https://data.alltheplaces.xyz/runs/2021-08-25-14-42-15/output/alnatura_de.geojson) ([on a map](https://data.alltheplaces.xyz/map.html?show=https://data.alltheplaces.xyz/runs/2021-08-25-14-42-15/output/alnatura_de.geojson))\n", "before_files": [{"content": "import scrapy\nimport re\nimport json\n\nfrom locations.items import GeojsonPointItem\nfrom locations.hours import OpeningHours\n\n\nDAY_MAPPING = {\n    1: 'Mo', 2: 'Tu', 3: 'We', 4: 'Th', 5: 'Fr', 6: 'Sa', 7: 'Su',\n    'Mo': 1, 'Tu': 2, 'We': 3, 'Th': 4, 'Fr': 5, 'Sa': 6, 'Su': 7\n}\n\n\nclass AlnaturaSpider(scrapy.Spider):\n    name = \"alnatura_de\"\n    allowed_domains = [\"www.alnatura.de\"]\n    start_urls = (\n        'https://www.alnatura.de/api/sitecore/stores/FindStoresforMap?'\n        'ElementsPerPage=10000&lat=50.99820058296841'\n        '&lng=7.811966062500009&radius=1483'\n        '&Tradepartner=Alnatura%20Super%20Natur%20Markt',\n    )\n\n    def parse_hours(self, store_hours):\n        opening_hours = OpeningHours()\n        match = re.match(r'(.+?)-(.+?) +(\\d.*?)-(.+?) Uhr', store_hours)\n        if match:\n            from_day = match.group(1).strip()\n            to_day = match.group(2).strip()\n            from_time = match.group(3).strip()\n            to_time = match.group(4).strip()\n\n            fhours = int(float(from_time))\n            fminutes = (float(from_time) * 60) % 60\n            fmt_from_time = \"%d:%02d\" % (fhours, fminutes)\n            thours = int(float(to_time))\n            tminutes = (float(to_time) * 60) % 60\n            fmt_to_time = \"%d:%02d\" % (thours, tminutes)\n\n        for day in range(DAY_MAPPING[from_day], DAY_MAPPING[to_day] + 1):\n            opening_hours.add_range(\n                day=DAY_MAPPING[day],\n                open_time=fmt_from_time,\n                close_time=fmt_to_time,\n                time_format='%H:%M'\n            )\n\n        return opening_hours.as_opening_hours()\n\n    def parse_stores(self, response):\n        store = json.loads(response.text)\n        store = store['Payload']\n\n        properties = {\n            'lat': response.meta.get('lat'),\n            'lon': response.meta.get('lng'),\n            'name': store['StoreName'],\n            'street': store['Street'],\n            'city': store['City'],\n            'postcode': store['PostalCode'],\n            'phone': store['Tel'],\n            'country': store['Country'],\n            'ref': response.meta.get('id'),\n        }\n\n        if store['OpeningTime']:\n            hours = self.parse_hours(store.get('OpeningTime'))\n            if hours:\n                properties[\"opening_hours\"] = hours\n\n        yield GeojsonPointItem(**properties)\n\n    def parse(self, response):\n        data = json.loads(response.text)\n\n        for stores in data['Payload']:\n            yield scrapy.Request(\n                f\"https://www.alnatura.de/api/sitecore/stores/StoreDetails\"\n                f\"?storeid={stores['Id']}\",\n                callback=self.parse_stores,\n                meta={\n                    'lat': stores['Lat'].replace(',', '.'),\n                    'lng': stores['Lng'].replace(',', '.'),\n                    'id': stores['Id'],\n                }\n            )\n", "path": "locations/spiders/alnatura_de.py"}]}