prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Spider tgifridays is broken
  During the global build at 2021-05-26-14-42-23, spider **tgifridays** failed with **0 features** and **0 errors**.
  
  Here's [the log](https://data.alltheplaces.xyz/runs/2021-05-26-14-42-23/logs/tgifridays.log) and [the output](https://data.alltheplaces.xyz/runs/2021-05-26-14-42-23/output/tgifridays.geojson) ([on a map](https://data.alltheplaces.xyz/map.html?show=https://data.alltheplaces.xyz/runs/2021-05-26-14-42-23/output/tgifridays.geojson))
  
  </issue>
  <code>
  [start of locations/spiders/tgifridays.py]
  1 # -*- coding: utf-8 -*-
  2 import datetime
  3 import re
  4 import json
  5 
  6 import scrapy
  7 from locations.items import GeojsonPointItem
  8 from locations.hours import OpeningHours
  9 
  10 
  11 DAY_MAPPING = {
  12     'Monday': 'Mo',
  13     'Tuesday': 'Tu',
  14     'Wednesday': 'We',
  15     'Thursday': 'Th',
  16     'Friday': 'Fr',
  17     'Saturday': 'Sa',
  18     'Sunday': 'Su'
  19 }
  20 
  21 
  22 class TGIFridaySpider(scrapy.Spider):
  23     download_delay = 0.2
  24     name = "tgifridays"
  25     item_attributes = { 'brand': "TGI Friday's" }
  26     allowed_domains = ["tgifridays.com"]
  27     start_urls = (
  28         'https://locations.tgifridays.com/sitemap.xml',
  29     )
  30 
  31     def parse_hours(self, hours):
  32         opening_hours = OpeningHours()
  33 
  34         for hour in hours:
  35             if hour["opens"] == "Closed":
  36                 continue
  37             elif hour["closes"] == "Closed":
  38                 continue
  39             else:
  40                 opening_hours.add_range(
  41                     day=hour["dayOfWeek"].replace('http://schema.org/', '')[:2],
  42                     open_time=hour["opens"],
  43                     close_time=hour["closes"],
  44                     time_format='%I:%M%p',
  45                 )
  46 
  47         return opening_hours.as_opening_hours()
  48 
  49     def parse_store(self, response):
  50         # The JSON blob has an extra "}\r\n" at the end
  51         data = json.loads(response.xpath('//script[@type="application/ld+json"]/text()').extract_first()[:-3])
  52 
  53         properties = {
  54             'addr_full': data['address']['streetAddress'],
  55             'phone': data['telephone'],
  56             'city': data['address']['addressLocality'],
  57             'state': data['address']['addressRegion'],
  58             'postcode': data['address']['postalCode'],
  59             'country': data['address']['addressCountry'],
  60             'ref': data['@id'],
  61             'website': data['url'],
  62             'lat': data['geo']['latitude'],
  63             'lon': data['geo']['longitude'],
  64             'name': data['name'],
  65         }
  66 
  67         hours = self.parse_hours(data.get("openingHoursSpecification", []))
  68         if hours:
  69             properties["opening_hours"] = hours
  70 
  71         yield GeojsonPointItem(**properties)
  72 
  73     def parse(self, response):
  74         response.selector.remove_namespaces()
  75         city_urls = response.xpath('//url/loc/text()').extract()
  76         for path in city_urls:
  77             if path.count('/') == 5:
  78                 yield scrapy.Request(
  79                     path.strip(),
  80                     callback=self.parse_store,
  81                 )
  82
  [end of locations/spiders/tgifridays.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/tgifridays.py b/locations/spiders/tgifridays.py
  --- a/locations/spiders/tgifridays.py
  +++ b/locations/spiders/tgifridays.py
  @@ -32,9 +32,9 @@
           opening_hours = OpeningHours()
   
           for hour in hours:
  -            if hour["opens"] == "Closed":
  +            if hour["opens"] in ("Closed", ""):
                   continue
  -            elif hour["closes"] == "Closed":
  +            elif hour["closes"] in ("Closed", ""):
                   continue
               else:
                   opening_hours.add_range(
  
verification_info: {"golden_diff": "diff --git a/locations/spiders/tgifridays.py b/locations/spiders/tgifridays.py\n--- a/locations/spiders/tgifridays.py\n+++ b/locations/spiders/tgifridays.py\n@@ -32,9 +32,9 @@\n         opening_hours = OpeningHours()\n \n         for hour in hours:\n-            if hour[\"opens\"] == \"Closed\":\n+            if hour[\"opens\"] in (\"Closed\", \"\"):\n                 continue\n-            elif hour[\"closes\"] == \"Closed\":\n+            elif hour[\"closes\"] in (\"Closed\", \"\"):\n                 continue\n             else:\n                 opening_hours.add_range(\n", "issue": "Spider tgifridays is broken\nDuring the global build at 2021-05-26-14-42-23, spider **tgifridays** failed with **0 features** and **0 errors**.\n\nHere's [the log](https://data.alltheplaces.xyz/runs/2021-05-26-14-42-23/logs/tgifridays.log) and [the output](https://data.alltheplaces.xyz/runs/2021-05-26-14-42-23/output/tgifridays.geojson) ([on a map](https://data.alltheplaces.xyz/map.html?show=https://data.alltheplaces.xyz/runs/2021-05-26-14-42-23/output/tgifridays.geojson))\n", "before_files": [{"content": "# -*- coding: utf-8 -*-\nimport datetime\nimport re\nimport json\n\nimport scrapy\nfrom locations.items import GeojsonPointItem\nfrom locations.hours import OpeningHours\n\n\nDAY_MAPPING = {\n    'Monday': 'Mo',\n    'Tuesday': 'Tu',\n    'Wednesday': 'We',\n    'Thursday': 'Th',\n    'Friday': 'Fr',\n    'Saturday': 'Sa',\n    'Sunday': 'Su'\n}\n\n\nclass TGIFridaySpider(scrapy.Spider):\n    download_delay = 0.2\n    name = \"tgifridays\"\n    item_attributes = { 'brand': \"TGI Friday's\" }\n    allowed_domains = [\"tgifridays.com\"]\n    start_urls = (\n        'https://locations.tgifridays.com/sitemap.xml',\n    )\n\n    def parse_hours(self, hours):\n        opening_hours = OpeningHours()\n\n        for hour in hours:\n            if hour[\"opens\"] == \"Closed\":\n                continue\n            elif hour[\"closes\"] == \"Closed\":\n                continue\n            else:\n                opening_hours.add_range(\n                    day=hour[\"dayOfWeek\"].replace('http://schema.org/', '')[:2],\n                    open_time=hour[\"opens\"],\n                    close_time=hour[\"closes\"],\n                    time_format='%I:%M%p',\n                )\n\n        return opening_hours.as_opening_hours()\n\n    def parse_store(self, response):\n        # The JSON blob has an extra \"}\\r\\n\" at the end\n        data = json.loads(response.xpath('//script[@type=\"application/ld+json\"]/text()').extract_first()[:-3])\n\n        properties = {\n            'addr_full': data['address']['streetAddress'],\n            'phone': data['telephone'],\n            'city': data['address']['addressLocality'],\n            'state': data['address']['addressRegion'],\n            'postcode': data['address']['postalCode'],\n            'country': data['address']['addressCountry'],\n            'ref': data['@id'],\n            'website': data['url'],\n            'lat': data['geo']['latitude'],\n            'lon': data['geo']['longitude'],\n            'name': data['name'],\n        }\n\n        hours = self.parse_hours(data.get(\"openingHoursSpecification\", []))\n        if hours:\n            properties[\"opening_hours\"] = hours\n\n        yield GeojsonPointItem(**properties)\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.count('/') == 5:\n                yield scrapy.Request(\n                    path.strip(),\n                    callback=self.parse_store,\n                )\n", "path": "locations/spiders/tgifridays.py"}]}