prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Spider jbhifi is broken
  During the global build at 2021-06-16-14-42-20, spider **jbhifi** failed with **78 features** and **1 errors**.
  
  Here's [the log](https://data.alltheplaces.xyz/runs/2021-06-16-14-42-20/logs/jbhifi.txt) and [the output](https://data.alltheplaces.xyz/runs/2021-06-16-14-42-20/output/jbhifi.geojson) ([on a map](https://data.alltheplaces.xyz/map.html?show=https://data.alltheplaces.xyz/runs/2021-06-16-14-42-20/output/jbhifi.geojson))
  
  </issue>
  <code>
  [start of locations/spiders/jbhifi.py]
  1 # -*- coding: utf-8 -*-
  2 import scrapy
  3 import json
  4 from locations.items import GeojsonPointItem
  5 from locations.hours import OpeningHours
  6 
  7 DAYS = ['Su', 'Mo', 'Tu', "We", 'Th', 'Fr', 'Sa']
  8 
  9 class JbHifiSpider(scrapy.Spider):
  10     name = "jbhifi"
  11     allowed_domains = ["algolia.net"]
  12     
  13     def start_requests(self):
  14         headers = {"Content-Type": "application/json",
  15                    "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:81.0) Gecko/20100101 Firefox/81.0",
  16                    "Origin": "https://www.jbhifi.com.au",
  17                    "Referer": "https://www.jbhifi.com.au/pages/store-finder",
  18                    "Accept": "*/*",
  19                    'Accept-Encoding': 'gzip, deflate'
  20 
  21                 }
  22         yield scrapy.http.Request(
  23             url="https://vtvkm5urpx-dsn.algolia.net/1/indexes/shopify_store_locations/query?x-algolia-agent=Algolia for JavaScript (3.35.1); Browser (lite)&x-algolia-application-id=VTVKM5URPX&x-algolia-api-key=a0c0108d737ad5ab54a0e2da900bf040",
  24             method="POST",
  25             headers=headers,
  26             body='{"params":"query=&hitsPerPage=1000&filters=displayOnWeb%3Ap"}')
  27 
  28     def process_trading_hours(self, store_hours):
  29         opening_hours = OpeningHours()
  30         for day in store_hours:
  31             opening_hours.add_range(DAYS[day['DayOfWeek']], day['OpeningTime'], day['ClosingTime'])
  32         
  33         return opening_hours.as_opening_hours()
  34 
  35     def parse(self, response):
  36         stores = json.loads(response.body)
  37 
  38         for store in stores['hits']:
  39             properties = {
  40                 'ref': store['shopId'],
  41                 'name': store['storeName'],
  42                 'addr_full': f"{store['storeAddress']['Line1']} {store['storeAddress'].get('Line2','')} {store['storeAddress'].get('Line3','')}".strip(),
  43                 'city': store['storeAddress']['Suburb'],
  44                 'state': store['storeAddress']['State'],
  45                 'postcode': store['storeAddress']['Postcode'],
  46                 'country': 'AU',
  47                 'lat': store['_geoloc']['lat'],
  48                 'lon': store['_geoloc']['lng'],
  49                 'phone': store['phone'],
  50                 'opening_hours': self.process_trading_hours(store['normalTradingHours'])
  51             }
  52 
  53             yield GeojsonPointItem(**properties)
  [end of locations/spiders/jbhifi.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/jbhifi.py b/locations/spiders/jbhifi.py
  --- a/locations/spiders/jbhifi.py
  +++ b/locations/spiders/jbhifi.py
  @@ -28,7 +28,8 @@
       def process_trading_hours(self, store_hours):
           opening_hours = OpeningHours()
           for day in store_hours:
  -            opening_hours.add_range(DAYS[day['DayOfWeek']], day['OpeningTime'], day['ClosingTime'])
  +            if 'NULL' not in day['OpeningTime'] and 'NULL' not in  day['ClosingTime']:
  +                opening_hours.add_range(DAYS[day['DayOfWeek']], day['OpeningTime'], day['ClosingTime'])
           
           return opening_hours.as_opening_hours()
  
verification_info: {"golden_diff": "diff --git a/locations/spiders/jbhifi.py b/locations/spiders/jbhifi.py\n--- a/locations/spiders/jbhifi.py\n+++ b/locations/spiders/jbhifi.py\n@@ -28,7 +28,8 @@\n     def process_trading_hours(self, store_hours):\n         opening_hours = OpeningHours()\n         for day in store_hours:\n-            opening_hours.add_range(DAYS[day['DayOfWeek']], day['OpeningTime'], day['ClosingTime'])\n+            if 'NULL' not in day['OpeningTime'] and 'NULL' not in  day['ClosingTime']:\n+                opening_hours.add_range(DAYS[day['DayOfWeek']], day['OpeningTime'], day['ClosingTime'])\n         \n         return opening_hours.as_opening_hours()\n", "issue": "Spider jbhifi is broken\nDuring the global build at 2021-06-16-14-42-20, spider **jbhifi** failed with **78 features** and **1 errors**.\n\nHere's [the log](https://data.alltheplaces.xyz/runs/2021-06-16-14-42-20/logs/jbhifi.txt) and [the output](https://data.alltheplaces.xyz/runs/2021-06-16-14-42-20/output/jbhifi.geojson) ([on a map](https://data.alltheplaces.xyz/map.html?show=https://data.alltheplaces.xyz/runs/2021-06-16-14-42-20/output/jbhifi.geojson))\n", "before_files": [{"content": "# -*- coding: utf-8 -*-\nimport scrapy\nimport json\nfrom locations.items import GeojsonPointItem\nfrom locations.hours import OpeningHours\n\nDAYS = ['Su', 'Mo', 'Tu', \"We\", 'Th', 'Fr', 'Sa']\n\nclass JbHifiSpider(scrapy.Spider):\n    name = \"jbhifi\"\n    allowed_domains = [\"algolia.net\"]\n    \n    def start_requests(self):\n        headers = {\"Content-Type\": \"application/json\",\n                   \"User-Agent\": \"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:81.0) Gecko/20100101 Firefox/81.0\",\n                   \"Origin\": \"https://www.jbhifi.com.au\",\n                   \"Referer\": \"https://www.jbhifi.com.au/pages/store-finder\",\n                   \"Accept\": \"*/*\",\n                   'Accept-Encoding': 'gzip, deflate'\n\n                }\n        yield scrapy.http.Request(\n            url=\"https://vtvkm5urpx-dsn.algolia.net/1/indexes/shopify_store_locations/query?x-algolia-agent=Algolia for JavaScript (3.35.1); Browser (lite)&x-algolia-application-id=VTVKM5URPX&x-algolia-api-key=a0c0108d737ad5ab54a0e2da900bf040\",\n            method=\"POST\",\n            headers=headers,\n            body='{\"params\":\"query=&hitsPerPage=1000&filters=displayOnWeb%3Ap\"}')\n\n    def process_trading_hours(self, store_hours):\n        opening_hours = OpeningHours()\n        for day in store_hours:\n            opening_hours.add_range(DAYS[day['DayOfWeek']], day['OpeningTime'], day['ClosingTime'])\n        \n        return opening_hours.as_opening_hours()\n\n    def parse(self, response):\n        stores = json.loads(response.body)\n\n        for store in stores['hits']:\n            properties = {\n                'ref': store['shopId'],\n                'name': store['storeName'],\n                'addr_full': f\"{store['storeAddress']['Line1']} {store['storeAddress'].get('Line2','')} {store['storeAddress'].get('Line3','')}\".strip(),\n                'city': store['storeAddress']['Suburb'],\n                'state': store['storeAddress']['State'],\n                'postcode': store['storeAddress']['Postcode'],\n                'country': 'AU',\n                'lat': store['_geoloc']['lat'],\n                'lon': store['_geoloc']['lng'],\n                'phone': store['phone'],\n                'opening_hours': self.process_trading_hours(store['normalTradingHours'])\n            }\n\n            yield GeojsonPointItem(**properties)", "path": "locations/spiders/jbhifi.py"}]}