prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Spider texas_roadhouse is broken
  During the global build at 2021-05-26-14-42-23, spider **texas_roadhouse** failed with **0 features** and **1 errors**.
  
  Here's [the log](https://data.alltheplaces.xyz/runs/2021-05-26-14-42-23/logs/texas_roadhouse.log) and [the output](https://data.alltheplaces.xyz/runs/2021-05-26-14-42-23/output/texas_roadhouse.geojson) ([on a map](https://data.alltheplaces.xyz/map.html?show=https://data.alltheplaces.xyz/runs/2021-05-26-14-42-23/output/texas_roadhouse.geojson))
  
  </issue>
  <code>
  [start of locations/spiders/texas_roadhouse.py]
  1 import json
  2 
  3 import scrapy
  4 
  5 from locations.items import GeojsonPointItem
  6 from locations.hours import OpeningHours
  7 
  8 
  9 class TexasRoadhouseSpider(scrapy.Spider):
  10     name = "texas_roadhouse"
  11     item_attributes = { 'brand': "Texas Roadhouse", 'brand_wikidata': "Q7707945" }
  12     allowed_domains = ["www.texasroadhouse.com"]
  13     start_urls = (
  14         'https://www.texasroadhouse.com/locations',
  15     )
  16 
  17     def parse_hours(self, store_hours):
  18         opening_hours = OpeningHours()
  19 
  20         for weekday in store_hours:
  21             # convert day from full Monday to Mo, etc
  22             day = weekday.get('day')[:2]
  23             open_time = weekday.get('hours').get('open')
  24             close_time = weekday.get('hours').get('close')
  25             opening_hours.add_range(day=day,
  26                                     open_time=open_time,
  27                                     close_time=close_time,
  28                                     time_format='%I:%M%p')
  29 
  30         return opening_hours.as_opening_hours()
  31 
  32     def parse(self, response):
  33         script_content = response.xpath('//script[contains(text(),"__locations__")]/text()').extract_first()
  34         # effectively strip off leading "window.__locations__ = " where
  35         # the rest is a json blob
  36         script_data = script_content.split(" = ", 1)[-1]
  37         script_data = script_data.rstrip(";")
  38         stores = json.loads(script_data)
  39 
  40         for store in stores:
  41             properties = {
  42                 'lat': store['gps_lat'],
  43                 'lon': store['gps_lon'],
  44                 'ref': store['url'],
  45                 'name': store['name'],
  46                 'addr_full': store['address1'],
  47                 'city': store['city'],
  48                 'state': store['state'],
  49                 'postcode': store['zip'],
  50                 'country': store['country'],
  51                 'phone': store['phone'],
  52                 'website': response.urljoin(store['url']),
  53                 'opening_hours': self.parse_hours(store['schedule']),
  54                 'extras': {
  55                     'amenity:toilets': True,
  56                 },
  57             }
  58 
  59             yield GeojsonPointItem(**properties)
  60
  [end of locations/spiders/texas_roadhouse.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/texas_roadhouse.py b/locations/spiders/texas_roadhouse.py
  --- a/locations/spiders/texas_roadhouse.py
  +++ b/locations/spiders/texas_roadhouse.py
  @@ -1,7 +1,5 @@
   import json
  -
   import scrapy
  -
   from locations.items import GeojsonPointItem
   from locations.hours import OpeningHours
   
  @@ -11,7 +9,7 @@
       item_attributes = { 'brand': "Texas Roadhouse", 'brand_wikidata': "Q7707945" }
       allowed_domains = ["www.texasroadhouse.com"]
       start_urls = (
  -        'https://www.texasroadhouse.com/locations',
  +        'https://www.texasroadhouse.com/sitemap.xml',
       )
   
       def parse_hours(self, store_hours):
  @@ -20,8 +18,8 @@
           for weekday in store_hours:
               # convert day from full Monday to Mo, etc
               day = weekday.get('day')[:2]
  -            open_time = weekday.get('hours').get('open')
  -            close_time = weekday.get('hours').get('close')
  +            open_time = weekday.get('hours').get('openTime')
  +            close_time = weekday.get('hours').get('closeTime')
               opening_hours.add_range(day=day,
                                       open_time=open_time,
                                       close_time=close_time,
  @@ -30,30 +28,31 @@
           return opening_hours.as_opening_hours()
   
       def parse(self, response):
  -        script_content = response.xpath('//script[contains(text(),"__locations__")]/text()').extract_first()
  -        # effectively strip off leading "window.__locations__ = " where
  -        # the rest is a json blob
  -        script_data = script_content.split(" = ", 1)[-1]
  -        script_data = script_data.rstrip(";")
  -        stores = json.loads(script_data)
  -
  -        for store in stores:
  -            properties = {
  -                'lat': store['gps_lat'],
  -                'lon': store['gps_lon'],
  -                'ref': store['url'],
  -                'name': store['name'],
  -                'addr_full': store['address1'],
  -                'city': store['city'],
  -                'state': store['state'],
  -                'postcode': store['zip'],
  -                'country': store['country'],
  -                'phone': store['phone'],
  -                'website': response.urljoin(store['url']),
  -                'opening_hours': self.parse_hours(store['schedule']),
  -                'extras': {
  -                    'amenity:toilets': True,
  -                },
  -            }
  -
  -            yield GeojsonPointItem(**properties)
  +        response.selector.remove_namespaces()
  +        city_urls = response.xpath('//url/loc/text()').extract()
  +        for path in city_urls:
  +            if path.startswith('https://www.texasroadhouse.com/locations/'):
  +                yield scrapy.Request(
  +                    path.strip(),
  +                    callback=self.parse_store,
  +                )
  +
  +    def parse_store(self, response):
  +        data = json.loads(response.xpath('//script/text()').extract_first()[22:-1])
  +
  +        properties = {
  +            'lat': data['latitude'],
  +            'lon': data['longitude'],
  +            'ref': data['url'],
  +            'name': data['name'],
  +            'addr_full': data['address1'],
  +            'city': data['city'],
  +            'state': data['state'],
  +            'postcode': data['postalCode'],
  +            'country': data['countryCode'],
  +            'phone': data['telephone'],
  +            'website': response.urljoin(data['url']),
  +            'opening_hours': self.parse_hours(data['schedule']),
  +        }
  +
  +        yield GeojsonPointItem(**properties)
  
verification_info: {"golden_diff": "diff --git a/locations/spiders/texas_roadhouse.py b/locations/spiders/texas_roadhouse.py\n--- a/locations/spiders/texas_roadhouse.py\n+++ b/locations/spiders/texas_roadhouse.py\n@@ -1,7 +1,5 @@\n import json\n-\n import scrapy\n-\n from locations.items import GeojsonPointItem\n from locations.hours import OpeningHours\n \n@@ -11,7 +9,7 @@\n     item_attributes = { 'brand': \"Texas Roadhouse\", 'brand_wikidata': \"Q7707945\" }\n     allowed_domains = [\"www.texasroadhouse.com\"]\n     start_urls = (\n-        'https://www.texasroadhouse.com/locations',\n+        'https://www.texasroadhouse.com/sitemap.xml',\n     )\n \n     def parse_hours(self, store_hours):\n@@ -20,8 +18,8 @@\n         for weekday in store_hours:\n             # convert day from full Monday to Mo, etc\n             day = weekday.get('day')[:2]\n-            open_time = weekday.get('hours').get('open')\n-            close_time = weekday.get('hours').get('close')\n+            open_time = weekday.get('hours').get('openTime')\n+            close_time = weekday.get('hours').get('closeTime')\n             opening_hours.add_range(day=day,\n                                     open_time=open_time,\n                                     close_time=close_time,\n@@ -30,30 +28,31 @@\n         return opening_hours.as_opening_hours()\n \n     def parse(self, response):\n-        script_content = response.xpath('//script[contains(text(),\"__locations__\")]/text()').extract_first()\n-        # effectively strip off leading \"window.__locations__ = \" where\n-        # the rest is a json blob\n-        script_data = script_content.split(\" = \", 1)[-1]\n-        script_data = script_data.rstrip(\";\")\n-        stores = json.loads(script_data)\n-\n-        for store in stores:\n-            properties = {\n-                'lat': store['gps_lat'],\n-                'lon': store['gps_lon'],\n-                'ref': store['url'],\n-                'name': store['name'],\n-                'addr_full': store['address1'],\n-                'city': store['city'],\n-                'state': store['state'],\n-                'postcode': store['zip'],\n-                'country': store['country'],\n-                'phone': store['phone'],\n-                'website': response.urljoin(store['url']),\n-                'opening_hours': self.parse_hours(store['schedule']),\n-                'extras': {\n-                    'amenity:toilets': True,\n-                },\n-            }\n-\n-            yield GeojsonPointItem(**properties)\n+        response.selector.remove_namespaces()\n+        city_urls = response.xpath('//url/loc/text()').extract()\n+        for path in city_urls:\n+            if path.startswith('https://www.texasroadhouse.com/locations/'):\n+                yield scrapy.Request(\n+                    path.strip(),\n+                    callback=self.parse_store,\n+                )\n+\n+    def parse_store(self, response):\n+        data = json.loads(response.xpath('//script/text()').extract_first()[22:-1])\n+\n+        properties = {\n+            'lat': data['latitude'],\n+            'lon': data['longitude'],\n+            'ref': data['url'],\n+            'name': data['name'],\n+            'addr_full': data['address1'],\n+            'city': data['city'],\n+            'state': data['state'],\n+            'postcode': data['postalCode'],\n+            'country': data['countryCode'],\n+            'phone': data['telephone'],\n+            'website': response.urljoin(data['url']),\n+            'opening_hours': self.parse_hours(data['schedule']),\n+        }\n+\n+        yield GeojsonPointItem(**properties)\n", "issue": "Spider texas_roadhouse is broken\nDuring the global build at 2021-05-26-14-42-23, spider **texas_roadhouse** failed with **0 features** and **1 errors**.\n\nHere's [the log](https://data.alltheplaces.xyz/runs/2021-05-26-14-42-23/logs/texas_roadhouse.log) and [the output](https://data.alltheplaces.xyz/runs/2021-05-26-14-42-23/output/texas_roadhouse.geojson) ([on a map](https://data.alltheplaces.xyz/map.html?show=https://data.alltheplaces.xyz/runs/2021-05-26-14-42-23/output/texas_roadhouse.geojson))\n", "before_files": [{"content": "import json\n\nimport scrapy\n\nfrom locations.items import GeojsonPointItem\nfrom locations.hours import OpeningHours\n\n\nclass TexasRoadhouseSpider(scrapy.Spider):\n    name = \"texas_roadhouse\"\n    item_attributes = { 'brand': \"Texas Roadhouse\", 'brand_wikidata': \"Q7707945\" }\n    allowed_domains = [\"www.texasroadhouse.com\"]\n    start_urls = (\n        'https://www.texasroadhouse.com/locations',\n    )\n\n    def parse_hours(self, store_hours):\n        opening_hours = OpeningHours()\n\n        for weekday in store_hours:\n            # convert day from full Monday to Mo, etc\n            day = weekday.get('day')[:2]\n            open_time = weekday.get('hours').get('open')\n            close_time = weekday.get('hours').get('close')\n            opening_hours.add_range(day=day,\n                                    open_time=open_time,\n                                    close_time=close_time,\n                                    time_format='%I:%M%p')\n\n        return opening_hours.as_opening_hours()\n\n    def parse(self, response):\n        script_content = response.xpath('//script[contains(text(),\"__locations__\")]/text()').extract_first()\n        # effectively strip off leading \"window.__locations__ = \" where\n        # the rest is a json blob\n        script_data = script_content.split(\" = \", 1)[-1]\n        script_data = script_data.rstrip(\";\")\n        stores = json.loads(script_data)\n\n        for store in stores:\n            properties = {\n                'lat': store['gps_lat'],\n                'lon': store['gps_lon'],\n                'ref': store['url'],\n                'name': store['name'],\n                'addr_full': store['address1'],\n                'city': store['city'],\n                'state': store['state'],\n                'postcode': store['zip'],\n                'country': store['country'],\n                'phone': store['phone'],\n                'website': response.urljoin(store['url']),\n                'opening_hours': self.parse_hours(store['schedule']),\n                'extras': {\n                    'amenity:toilets': True,\n                },\n            }\n\n            yield GeojsonPointItem(**properties)\n", "path": "locations/spiders/texas_roadhouse.py"}]}