prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Spider quiznos is broken
  During the global build at 2021-05-26-14-42-23, spider **quiznos** failed with **129 features** and **1 errors**.
  
  Here's [the log](https://data.alltheplaces.xyz/runs/2021-05-26-14-42-23/logs/quiznos.log) and [the output](https://data.alltheplaces.xyz/runs/2021-05-26-14-42-23/output/quiznos.geojson) ([on a map](https://data.alltheplaces.xyz/map.html?show=https://data.alltheplaces.xyz/runs/2021-05-26-14-42-23/output/quiznos.geojson))
  
  </issue>
  <code>
  [start of locations/spiders/quiznos.py]
  1 # -*- coding: utf-8 -*-
  2 import scrapy
  3 import json
  4 import re
  5 import traceback
  6 
  7 from locations.items import GeojsonPointItem
  8 
  9 URL = "http://restaurants.quiznos.com"
  10 
  11 class QuiznosSpider(scrapy.Spider):
  12     name = "quiznos"
  13     item_attributes = { 'brand': "Quizno's", 'brand_wikidata': "Q1936229" }
  14     allowed_domains = [URL]
  15     start_urls = (
  16         'http://restaurants.quiznos.com/data/stores.json?callback=storeList',
  17     )
  18 
  19     def store_hours(self, store_hours):
  20         if store_hours == '' or store_hours.lower().find('close') > -1: return ''
  21 
  22         day_groups = []
  23         this_day_group = None
  24         hour_intervals = []
  25 
  26         interval = store_hours.split(' - ')
  27         start_time = interval[0].split(' ')
  28         end_time = interval[1].split(' ')
  29         start_hour = start_time[0].split(':')
  30         end_hour = end_time[0].split(':')
  31 
  32         hour_intervals.append('{}:{}-{}:{}'.format(
  33             start_hour[0],
  34             start_hour[1],
  35             int(end_hour[0]) + 12 if end_time[1] == 'PM' else end_hour[0],
  36             end_hour[1],
  37         ))
  38 
  39         hours = ','.join(hour_intervals)
  40 
  41         if not this_day_group:
  42             this_day_group = {
  43                 'from_day': 'Su',
  44                 'to_day': 'Sa',
  45                 'hours': hours
  46             }
  47 
  48         day_groups.append(this_day_group)
  49 
  50         opening_hours = ""
  51         if len(day_groups) == 1 and day_groups[0]['hours'] in ('00:00-23:59', '00:00-00:00'):
  52             opening_hours = '24/7'
  53         else:
  54             for day_group in day_groups:
  55                 if day_group['from_day'] == day_group['to_day']:
  56                     opening_hours += '{from_day} {hours}; '.format(**day_group)
  57                 elif day_group['from_day'] == 'Su' and day_group['to_day'] == 'Sa':
  58                     opening_hours += '{hours}; '.format(**day_group)
  59                 else:
  60                     opening_hours += '{from_day}-{to_day} {hours}; '.format(**day_group)
  61             opening_hours = opening_hours[:-2]
  62 
  63         return opening_hours
  64 
  65     def parse(self, response):
  66         data = response.body_as_unicode()
  67         stores = json.loads(re.search(r'storeList\((.*)\)', data).group(1))
  68 
  69         for store in stores:
  70 
  71             yield GeojsonPointItem(
  72                 lat=store.get('latitude'),
  73                 lon=store.get('longitude'),
  74                 ref=str(store.get('storeid')),
  75                 phone=store.get('phone'),
  76                 name=store.get('restaurantname'),
  77                 opening_hours=self.store_hours(store.get('businesshours')),
  78                 addr_full=store.get('address1'),
  79                 city=store.get('city'),
  80                 state=store.get('statecode'),
  81                 postcode=store.get('zipcode'),
  82                 website=URL + store.get('url'),
  83             )
  84
  [end of locations/spiders/quiznos.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/quiznos.py b/locations/spiders/quiznos.py
  --- a/locations/spiders/quiznos.py
  +++ b/locations/spiders/quiznos.py
  @@ -2,22 +2,24 @@
   import scrapy
   import json
   import re
  -import traceback
   
   from locations.items import GeojsonPointItem
   
  -URL = "http://restaurants.quiznos.com"
   
   class QuiznosSpider(scrapy.Spider):
       name = "quiznos"
       item_attributes = { 'brand': "Quizno's", 'brand_wikidata': "Q1936229" }
  -    allowed_domains = [URL]
  +    allowed_domains = ["https://restaurants.quiznos.com"]
       start_urls = (
  -        'http://restaurants.quiznos.com/data/stores.json?callback=storeList',
  +        'https://restaurants.quiznos.com/data/stores.json',
       )
   
       def store_hours(self, store_hours):
  -        if store_hours == '' or store_hours.lower().find('close') > -1: return ''
  +        if store_hours == '' or store_hours == ' - ' or store_hours.lower().find('close') > -1:
  +            return ''
  +
  +        if store_hours == 'Open 24 Hours - Open 24 Hours':
  +            return '24/7'
   
           day_groups = []
           this_day_group = None
  @@ -67,17 +69,18 @@
           stores = json.loads(re.search(r'storeList\((.*)\)', data).group(1))
   
           for store in stores:
  +            properties = {
  +                "lat": store.get('latitude'),
  +                "lon": store.get('longitude'),
  +                "ref": str(store.get('storeid')),
  +                "phone": store.get('phone'),
  +                "name": store.get('restaurantname'),
  +                "opening_hours": self.store_hours(store.get('businesshours')),
  +                "addr_full": store.get('address1'),
  +                "city": store.get('city'),
  +                "state": store.get('statecode'),
  +                "postcode": store.get('zipcode'),
  +                "website": response.urljoin(store.get('url')),
  +            }
   
  -            yield GeojsonPointItem(
  -                lat=store.get('latitude'),
  -                lon=store.get('longitude'),
  -                ref=str(store.get('storeid')),
  -                phone=store.get('phone'),
  -                name=store.get('restaurantname'),
  -                opening_hours=self.store_hours(store.get('businesshours')),
  -                addr_full=store.get('address1'),
  -                city=store.get('city'),
  -                state=store.get('statecode'),
  -                postcode=store.get('zipcode'),
  -                website=URL + store.get('url'),
  -            )
  +            yield GeojsonPointItem(**properties)
  
verification_info: {"golden_diff": "diff --git a/locations/spiders/quiznos.py b/locations/spiders/quiznos.py\n--- a/locations/spiders/quiznos.py\n+++ b/locations/spiders/quiznos.py\n@@ -2,22 +2,24 @@\n import scrapy\n import json\n import re\n-import traceback\n \n from locations.items import GeojsonPointItem\n \n-URL = \"http://restaurants.quiznos.com\"\n \n class QuiznosSpider(scrapy.Spider):\n     name = \"quiznos\"\n     item_attributes = { 'brand': \"Quizno's\", 'brand_wikidata': \"Q1936229\" }\n-    allowed_domains = [URL]\n+    allowed_domains = [\"https://restaurants.quiznos.com\"]\n     start_urls = (\n-        'http://restaurants.quiznos.com/data/stores.json?callback=storeList',\n+        'https://restaurants.quiznos.com/data/stores.json',\n     )\n \n     def store_hours(self, store_hours):\n-        if store_hours == '' or store_hours.lower().find('close') > -1: return ''\n+        if store_hours == '' or store_hours == ' - ' or store_hours.lower().find('close') > -1:\n+            return ''\n+\n+        if store_hours == 'Open 24 Hours - Open 24 Hours':\n+            return '24/7'\n \n         day_groups = []\n         this_day_group = None\n@@ -67,17 +69,18 @@\n         stores = json.loads(re.search(r'storeList\\((.*)\\)', data).group(1))\n \n         for store in stores:\n+            properties = {\n+                \"lat\": store.get('latitude'),\n+                \"lon\": store.get('longitude'),\n+                \"ref\": str(store.get('storeid')),\n+                \"phone\": store.get('phone'),\n+                \"name\": store.get('restaurantname'),\n+                \"opening_hours\": self.store_hours(store.get('businesshours')),\n+                \"addr_full\": store.get('address1'),\n+                \"city\": store.get('city'),\n+                \"state\": store.get('statecode'),\n+                \"postcode\": store.get('zipcode'),\n+                \"website\": response.urljoin(store.get('url')),\n+            }\n \n-            yield GeojsonPointItem(\n-                lat=store.get('latitude'),\n-                lon=store.get('longitude'),\n-                ref=str(store.get('storeid')),\n-                phone=store.get('phone'),\n-                name=store.get('restaurantname'),\n-                opening_hours=self.store_hours(store.get('businesshours')),\n-                addr_full=store.get('address1'),\n-                city=store.get('city'),\n-                state=store.get('statecode'),\n-                postcode=store.get('zipcode'),\n-                website=URL + store.get('url'),\n-            )\n+            yield GeojsonPointItem(**properties)\n", "issue": "Spider quiznos is broken\nDuring the global build at 2021-05-26-14-42-23, spider **quiznos** failed with **129 features** and **1 errors**.\n\nHere's [the log](https://data.alltheplaces.xyz/runs/2021-05-26-14-42-23/logs/quiznos.log) and [the output](https://data.alltheplaces.xyz/runs/2021-05-26-14-42-23/output/quiznos.geojson) ([on a map](https://data.alltheplaces.xyz/map.html?show=https://data.alltheplaces.xyz/runs/2021-05-26-14-42-23/output/quiznos.geojson))\n", "before_files": [{"content": "# -*- coding: utf-8 -*-\nimport scrapy\nimport json\nimport re\nimport traceback\n\nfrom locations.items import GeojsonPointItem\n\nURL = \"http://restaurants.quiznos.com\"\n\nclass QuiznosSpider(scrapy.Spider):\n    name = \"quiznos\"\n    item_attributes = { 'brand': \"Quizno's\", 'brand_wikidata': \"Q1936229\" }\n    allowed_domains = [URL]\n    start_urls = (\n        'http://restaurants.quiznos.com/data/stores.json?callback=storeList',\n    )\n\n    def store_hours(self, store_hours):\n        if store_hours == '' or store_hours.lower().find('close') > -1: return ''\n\n        day_groups = []\n        this_day_group = None\n        hour_intervals = []\n\n        interval = store_hours.split(' - ')\n        start_time = interval[0].split(' ')\n        end_time = interval[1].split(' ')\n        start_hour = start_time[0].split(':')\n        end_hour = end_time[0].split(':')\n\n        hour_intervals.append('{}:{}-{}:{}'.format(\n            start_hour[0],\n            start_hour[1],\n            int(end_hour[0]) + 12 if end_time[1] == 'PM' else end_hour[0],\n            end_hour[1],\n        ))\n\n        hours = ','.join(hour_intervals)\n\n        if not this_day_group:\n            this_day_group = {\n                'from_day': 'Su',\n                'to_day': 'Sa',\n                'hours': hours\n            }\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 parse(self, response):\n        data = response.body_as_unicode()\n        stores = json.loads(re.search(r'storeList\\((.*)\\)', data).group(1))\n\n        for store in stores:\n\n            yield GeojsonPointItem(\n                lat=store.get('latitude'),\n                lon=store.get('longitude'),\n                ref=str(store.get('storeid')),\n                phone=store.get('phone'),\n                name=store.get('restaurantname'),\n                opening_hours=self.store_hours(store.get('businesshours')),\n                addr_full=store.get('address1'),\n                city=store.get('city'),\n                state=store.get('statecode'),\n                postcode=store.get('zipcode'),\n                website=URL + store.get('url'),\n            )\n", "path": "locations/spiders/quiznos.py"}]}