prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Spider labreweries is broken
  During the global build at 2021-07-21-14-42-39, spider **labreweries** failed with **0 features** and **88 errors**.
  
  Here's [the log](https://data.alltheplaces.xyz/runs/2021-07-21-14-42-39/logs/labreweries.txt) and [the output](https://data.alltheplaces.xyz/runs/2021-07-21-14-42-39/output/labreweries.geojson) ([on a map](https://data.alltheplaces.xyz/map.html?show=https://data.alltheplaces.xyz/runs/2021-07-21-14-42-39/output/labreweries.geojson))
  
  </issue>
  <code>
  [start of locations/spiders/labreweries.py]
  1 # -*- coding: utf-8 -*-
  2 import scrapy
  3 import re
  4 
  5 from locations.items import GeojsonPointItem
  6 
  7 
  8 class LaBreweriesSpider(scrapy.Spider):
  9     name = "labreweries"
  10     allowed_domains = ["labeerhop.com"]
  11     start_urls = (
  12         'http://labeerhop.com/breweries-sitemap.xml',
  13     )
  14 
  15     def store_hours(self, store_hours):
  16         day_groups = []
  17         this_day_group = None
  18         for day in store_hours:
  19             day = day.replace('  :-', ' 12:00 -')
  20             day = day.split('<h5>Hours</h5>')[1].strip('<br>').strip('</aside>')
  21             match = re.search(r'(closed|(\d{1,2})\S.\s*-\s*(\d{1,2})\S.)', day.lower())
  22             open('/tmp/test1.txt', 'w').write(str(day))
  23             (dow, f_hr, t_hr) = match.groups()
  24             day_short = dow[:2]
  25 
  26             f_hr = int(f_hr)
  27             t_hr = int(t_hr)
  28 
  29             hours = '{:02d}-{:02d}'.format(
  30                 f_hr,
  31                 t_hr,
  32             )
  33 
  34             if not this_day_group:
  35                 this_day_group = {
  36                     'from_day': day_short,
  37                     'to_day': day_short,
  38                     'hours': hours
  39                 }
  40             elif this_day_group['hours'] != hours:
  41                 day_groups.append(this_day_group)
  42                 this_day_group = {
  43                     'from_day': day_short,
  44                     'to_day': day_short,
  45                     'hours': hours
  46                 }
  47             elif this_day_group['hours'] == hours:
  48                 this_day_group['to_day'] = day_short
  49 
  50         day_groups.append(this_day_group)
  51 
  52         opening_hours = ""
  53         if len(day_groups) == 1 and day_groups[0]['hours'] in ('00:00-23:59', '00:00-00:00'):
  54             opening_hours = '24/7'
  55         else:
  56             for day_group in day_groups:
  57                 if day_group['from_day'] == day_group['to_day']:
  58                     opening_hours += '{from_day} {hours}; '.format(**day_group)
  59                 elif day_group['from_day'] == 'Su' and day_group['to_day'] == 'Sa':
  60                     opening_hours += '{hours}; '.format(**day_group)
  61                 else:
  62                     opening_hours += '{from_day}-{to_day} {hours}; '.format(**day_group)
  63             opening_hours = opening_hours[:-2]
  64 
  65         return opening_hours
  66 
  67     def address(self, address):
  68         if not address:
  69             return None
  70 
  71         addr_tags = {
  72             "addr_full": address[0].split(',')[0].strip(),
  73             "city": address[0].split(',')[1].strip(),
  74             "state": address[0].split(' ')[-2].strip(),
  75             "postcode": address[0].split(' ')[-1].strip(),
  76         }
  77 
  78         return addr_tags
  79 
  80     def parse(self, response):
  81         response.selector.remove_namespaces()
  82         city_urls = response.xpath('//url/loc/text()').extract()
  83         for path in city_urls:
  84             if path not in "http://labeerhop.com/breweries/1056/":
  85                 yield scrapy.Request(
  86                     path.strip(),
  87                     callback=self.parse_store,
  88                 )
  89 
  90     def parse_store(self, response):
  91 
  92         properties = {
  93             'website': response.xpath('//head/link[@rel="canonical"]/@href').extract_first(),
  94             'ref': str(response.xpath('/html/body/div[1]/div[1]/header/h1/text()').extract()).strip("['']"),
  95             'opening_hours': re.sub(r'\s+', ' ', response.css('#secondary').extract()[0].split('<h5>Hours</h5>')[1].replace('<br>','').replace('</aside>','').replace('\t',' ').replace('\n','').replace('\r',' ')).strip(),
  96             # 'lon': float(data['geo']['longitude']),   # not lon on page
  97             # 'lat': float(data['geo']['latitude']),    # not lat on page
  98         }
  99 
  100         address = self.address(response.xpath('/html/body/div[1]/div[1]/aside/address/text()').extract())
  101         if address:
  102             properties.update(address)
  103 
  104 
  105         yield GeojsonPointItem(**properties)
  106
  [end of locations/spiders/labreweries.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/labreweries.py b/locations/spiders/labreweries.py
  --- a/locations/spiders/labreweries.py
  +++ b/locations/spiders/labreweries.py
  @@ -92,7 +92,7 @@
           properties = {
               'website': response.xpath('//head/link[@rel="canonical"]/@href').extract_first(),
               'ref': str(response.xpath('/html/body/div[1]/div[1]/header/h1/text()').extract()).strip("['']"),
  -            'opening_hours': re.sub(r'\s+', ' ', response.css('#secondary').extract()[0].split('<h5>Hours</h5>')[1].replace('<br>','').replace('</aside>','').replace('\t',' ').replace('\n','').replace('\r',' ')).strip(),
  +            'opening_hours': re.sub(r'\s+', ' ', response.xpath('//*[@id="content"]/div/div[2]/div[3]').extract()[0].split('<h5 class="mb-2">Hours</h5>')[1].replace('<br>','').replace('</div>','').replace('\t',' ').replace('\n','').replace('\r',' ')).strip(),
               # 'lon': float(data['geo']['longitude']),   # not lon on page
               # 'lat': float(data['geo']['latitude']),    # not lat on page
           }
  
verification_info: {"golden_diff": "diff --git a/locations/spiders/labreweries.py b/locations/spiders/labreweries.py\n--- a/locations/spiders/labreweries.py\n+++ b/locations/spiders/labreweries.py\n@@ -92,7 +92,7 @@\n         properties = {\n             'website': response.xpath('//head/link[@rel=\"canonical\"]/@href').extract_first(),\n             'ref': str(response.xpath('/html/body/div[1]/div[1]/header/h1/text()').extract()).strip(\"['']\"),\n-            'opening_hours': re.sub(r'\\s+', ' ', response.css('#secondary').extract()[0].split('<h5>Hours</h5>')[1].replace('<br>','').replace('</aside>','').replace('\\t',' ').replace('\\n','').replace('\\r',' ')).strip(),\n+            'opening_hours': re.sub(r'\\s+', ' ', response.xpath('//*[@id=\"content\"]/div/div[2]/div[3]').extract()[0].split('<h5 class=\"mb-2\">Hours</h5>')[1].replace('<br>','').replace('</div>','').replace('\\t',' ').replace('\\n','').replace('\\r',' ')).strip(),\n             # 'lon': float(data['geo']['longitude']),   # not lon on page\n             # 'lat': float(data['geo']['latitude']),    # not lat on page\n         }\n", "issue": "Spider labreweries is broken\nDuring the global build at 2021-07-21-14-42-39, spider **labreweries** failed with **0 features** and **88 errors**.\n\nHere's [the log](https://data.alltheplaces.xyz/runs/2021-07-21-14-42-39/logs/labreweries.txt) and [the output](https://data.alltheplaces.xyz/runs/2021-07-21-14-42-39/output/labreweries.geojson) ([on a map](https://data.alltheplaces.xyz/map.html?show=https://data.alltheplaces.xyz/runs/2021-07-21-14-42-39/output/labreweries.geojson))\n", "before_files": [{"content": "# -*- coding: utf-8 -*-\nimport scrapy\nimport re\n\nfrom locations.items import GeojsonPointItem\n\n\nclass LaBreweriesSpider(scrapy.Spider):\n    name = \"labreweries\"\n    allowed_domains = [\"labeerhop.com\"]\n    start_urls = (\n        'http://labeerhop.com/breweries-sitemap.xml',\n    )\n\n    def store_hours(self, store_hours):\n        day_groups = []\n        this_day_group = None\n        for day in store_hours:\n            day = day.replace('  :-', ' 12:00 -')\n            day = day.split('<h5>Hours</h5>')[1].strip('<br>').strip('</aside>')\n            match = re.search(r'(closed|(\\d{1,2})\\S.\\s*-\\s*(\\d{1,2})\\S.)', day.lower())\n            open('/tmp/test1.txt', 'w').write(str(day))\n            (dow, f_hr, t_hr) = match.groups()\n            day_short = dow[:2]\n\n            f_hr = int(f_hr)\n            t_hr = int(t_hr)\n\n            hours = '{:02d}-{:02d}'.format(\n                f_hr,\n                t_hr,\n            )\n\n            if not this_day_group:\n                this_day_group = {\n                    'from_day': day_short,\n                    'to_day': day_short,\n                    'hours': hours\n                }\n            elif this_day_group['hours'] != hours:\n                day_groups.append(this_day_group)\n                this_day_group = {\n                    'from_day': day_short,\n                    'to_day': day_short,\n                    'hours': hours\n                }\n            elif this_day_group['hours'] == hours:\n                this_day_group['to_day'] = day_short\n\n        day_groups.append(this_day_group)\n\n        opening_hours = \"\"\n        if len(day_groups) == 1 and day_groups[0]['hours'] in ('00:00-23:59', '00:00-00:00'):\n            opening_hours = '24/7'\n        else:\n            for day_group in day_groups:\n                if day_group['from_day'] == day_group['to_day']:\n                    opening_hours += '{from_day} {hours}; '.format(**day_group)\n                elif day_group['from_day'] == 'Su' and day_group['to_day'] == 'Sa':\n                    opening_hours += '{hours}; '.format(**day_group)\n                else:\n                    opening_hours += '{from_day}-{to_day} {hours}; '.format(**day_group)\n            opening_hours = opening_hours[:-2]\n\n        return opening_hours\n\n    def address(self, address):\n        if not address:\n            return None\n\n        addr_tags = {\n            \"addr_full\": address[0].split(',')[0].strip(),\n            \"city\": address[0].split(',')[1].strip(),\n            \"state\": address[0].split(' ')[-2].strip(),\n            \"postcode\": address[0].split(' ')[-1].strip(),\n        }\n\n        return addr_tags\n\n    def parse(self, response):\n        response.selector.remove_namespaces()\n        city_urls = response.xpath('//url/loc/text()').extract()\n        for path in city_urls:\n            if path not in \"http://labeerhop.com/breweries/1056/\":\n                yield scrapy.Request(\n                    path.strip(),\n                    callback=self.parse_store,\n                )\n\n    def parse_store(self, response):\n\n        properties = {\n            'website': response.xpath('//head/link[@rel=\"canonical\"]/@href').extract_first(),\n            'ref': str(response.xpath('/html/body/div[1]/div[1]/header/h1/text()').extract()).strip(\"['']\"),\n            'opening_hours': re.sub(r'\\s+', ' ', response.css('#secondary').extract()[0].split('<h5>Hours</h5>')[1].replace('<br>','').replace('</aside>','').replace('\\t',' ').replace('\\n','').replace('\\r',' ')).strip(),\n            # 'lon': float(data['geo']['longitude']),   # not lon on page\n            # 'lat': float(data['geo']['latitude']),    # not lat on page\n        }\n\n        address = self.address(response.xpath('/html/body/div[1]/div[1]/aside/address/text()').extract())\n        if address:\n            properties.update(address)\n\n\n        yield GeojsonPointItem(**properties)\n", "path": "locations/spiders/labreweries.py"}]}