prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  Spider tacocabana is broken
  During the global build at 2021-05-26-14-42-23, spider **tacocabana** failed with **0 features** and **1 errors**.
  
  Here's [the log](https://data.alltheplaces.xyz/runs/2021-05-26-14-42-23/logs/tacocabana.log) and [the output](https://data.alltheplaces.xyz/runs/2021-05-26-14-42-23/output/tacocabana.geojson) ([on a map](https://data.alltheplaces.xyz/map.html?show=https://data.alltheplaces.xyz/runs/2021-05-26-14-42-23/output/tacocabana.geojson))
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `locations/spiders/tacocabana.py`
  Content:
  ```
  1 # -*- coding: utf-8 -*-
  2 import scrapy
  3 import json
  4 import re
  5 
  6 from locations.items import GeojsonPointItem
  7 
  8 class TacocabanaSpider(scrapy.Spider):
  9     name = "tacocabana"
  10     item_attributes = { 'brand': "Taco Cabana" }
  11     allowed_domains = ["www.tacocabana.com"]
  12     start_urls = (
  13         "http://www.tacocabana.com/wp-admin/admin-ajax.php?action=get_ajax_processor&processor=get-locations&queryType=&postID=816",
  14     )
  15         
  16     def parse(self, response):
  17         data = json.loads(re.sub(r"\s<.*?>.*<.*?>\s", "", response.body_as_unicode()))
  18 
  19         for store in data:
  20             properties = {
  21                 "phone"         : store["phone_number"],
  22                 "ref"           : str(store["locator_store_number"]),
  23                 "name"          : store["post_title"],
  24                 "opening_hours" : store["hours"],
  25                 "website"       : store["permalink"],
  26                 "lat"           : store["x_coordinate"],
  27                 "lon"           : store["y_coordinate"],
  28                 "street"        : store["street_address_1"] + store["street_address_2"],
  29                 "city"          : store["city"],
  30                 "state"         : store["state"],
  31                 "postcode"      : store["zip_code"]
  32             }
  33             
  34             yield GeojsonPointItem(**properties)
  35         
  36         else:
  37             self.logger.info("No results")
  38
  ```
  --- END FILES ---
  
  Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.
  
  Here is an example:
  
  ```diff
  diff --git a/examples/server_async.py b/examples/server_async.py
  --- a/examples/server_async.py
  +++ b/examples/server_async.py
  @@ -313,4 +313,4 @@
   
   
   if __name__ == "__main__":
  -    asyncio.run(run_async_server("."), debug=True)
  +    asyncio.run(run_async_server(), debug=True)
  diff --git a/examples/server_sync.py b/examples/server_sync.py
  --- a/examples/server_sync.py
  +++ b/examples/server_sync.py
  @@ -313,5 +313,5 @@
   
   
   if __name__ == "__main__":
  -    server = run_sync_server(".")
  +    server = run_sync_server()
       server.shutdown()
  
  ```
  
golden_diff: diff --git a/locations/spiders/tacocabana.py b/locations/spiders/tacocabana.py
  --- a/locations/spiders/tacocabana.py
  +++ b/locations/spiders/tacocabana.py
  @@ -1,37 +1,55 @@
   # -*- coding: utf-8 -*-
   import scrapy
  -import json
  -import re
   
   from locations.items import GeojsonPointItem
   
  +
   class TacocabanaSpider(scrapy.Spider):
       name = "tacocabana"
  -    item_attributes = { 'brand': "Taco Cabana" }
  -    allowed_domains = ["www.tacocabana.com"]
  -    start_urls = (
  -        "http://www.tacocabana.com/wp-admin/admin-ajax.php?action=get_ajax_processor&processor=get-locations&queryType=&postID=816",
  -    )
  -        
  +    item_attributes = {"brand": "Taco Cabana"}
  +    allowed_domains = ["api.koala.fuzzhq.com"]
  +
  +    def start_requests(self):
  +        yield scrapy.http.JsonRequest(
  +            "https://api.koala.fuzzhq.com/oauth/access_token",
  +            data={
  +                "client_id": "3nA4STkGif0fZGApqxMlVewy3h8HN6Fsy7jVOACP",
  +                "client_secret": "8oBU5gWiNg04zYzz61hN3ETrTIzvmbGyeLCX0F1s",
  +                "grant_type": "ordering_app_credentials",
  +                "scope": "group:ordering_app",
  +            },
  +            callback=self.fetch_locations,
  +        )
  +
  +    def fetch_locations(self, response):
  +        self.access_token = response.json()["access_token"]
  +        yield self.request(
  +            "https://api.koala.fuzzhq.com/v1/ordering/store-locations/?include[]=operating_hours&include[]=attributes&per_page=50"
  +        )
  +
  +    def request(self, url):
  +        return scrapy.Request(
  +            url, headers={"Authorization": f"Bearer {self.access_token}"}
  +        )
  +
       def parse(self, response):
  -        data = json.loads(re.sub(r"\s<.*?>.*<.*?>\s", "", response.body_as_unicode()))
  +        data = response.json()
   
  -        for store in data:
  +        for store in data["data"]:
               properties = {
  -                "phone"         : store["phone_number"],
  -                "ref"           : str(store["locator_store_number"]),
  -                "name"          : store["post_title"],
  -                "opening_hours" : store["hours"],
  -                "website"       : store["permalink"],
  -                "lat"           : store["x_coordinate"],
  -                "lon"           : store["y_coordinate"],
  -                "street"        : store["street_address_1"] + store["street_address_2"],
  -                "city"          : store["city"],
  -                "state"         : store["state"],
  -                "postcode"      : store["zip_code"]
  +                "website": f'https://olo.tacocabana.com/menu/{store["slug"]}?showInfoModal=true',
  +                "ref": store["brand_id"],
  +                "lat": store["latitude"],
  +                "lon": store["longitude"],
  +                "addr_full": store["street_address"],
  +                "city": store["city"],
  +                "state": store["cached_data"]["state"],
  +                "country": store["country"],
  +                "postcode": store["zip_code"],
  +                "phone": store["phone_number"],
               }
  -            
               yield GeojsonPointItem(**properties)
  -        
  -        else:
  -            self.logger.info("No results")
  +
  +        next_url = data["meta"]["pagination"]["links"]["next"]
  +        if next_url:
  +            yield self.request(next_url)
  
verification_info: {"golden_diff": "diff --git a/locations/spiders/tacocabana.py b/locations/spiders/tacocabana.py\n--- a/locations/spiders/tacocabana.py\n+++ b/locations/spiders/tacocabana.py\n@@ -1,37 +1,55 @@\n # -*- coding: utf-8 -*-\n import scrapy\n-import json\n-import re\n \n from locations.items import GeojsonPointItem\n \n+\n class TacocabanaSpider(scrapy.Spider):\n     name = \"tacocabana\"\n-    item_attributes = { 'brand': \"Taco Cabana\" }\n-    allowed_domains = [\"www.tacocabana.com\"]\n-    start_urls = (\n-        \"http://www.tacocabana.com/wp-admin/admin-ajax.php?action=get_ajax_processor&processor=get-locations&queryType=&postID=816\",\n-    )\n-        \n+    item_attributes = {\"brand\": \"Taco Cabana\"}\n+    allowed_domains = [\"api.koala.fuzzhq.com\"]\n+\n+    def start_requests(self):\n+        yield scrapy.http.JsonRequest(\n+            \"https://api.koala.fuzzhq.com/oauth/access_token\",\n+            data={\n+                \"client_id\": \"3nA4STkGif0fZGApqxMlVewy3h8HN6Fsy7jVOACP\",\n+                \"client_secret\": \"8oBU5gWiNg04zYzz61hN3ETrTIzvmbGyeLCX0F1s\",\n+                \"grant_type\": \"ordering_app_credentials\",\n+                \"scope\": \"group:ordering_app\",\n+            },\n+            callback=self.fetch_locations,\n+        )\n+\n+    def fetch_locations(self, response):\n+        self.access_token = response.json()[\"access_token\"]\n+        yield self.request(\n+            \"https://api.koala.fuzzhq.com/v1/ordering/store-locations/?include[]=operating_hours&include[]=attributes&per_page=50\"\n+        )\n+\n+    def request(self, url):\n+        return scrapy.Request(\n+            url, headers={\"Authorization\": f\"Bearer {self.access_token}\"}\n+        )\n+\n     def parse(self, response):\n-        data = json.loads(re.sub(r\"\\s<.*?>.*<.*?>\\s\", \"\", response.body_as_unicode()))\n+        data = response.json()\n \n-        for store in data:\n+        for store in data[\"data\"]:\n             properties = {\n-                \"phone\"         : store[\"phone_number\"],\n-                \"ref\"           : str(store[\"locator_store_number\"]),\n-                \"name\"          : store[\"post_title\"],\n-                \"opening_hours\" : store[\"hours\"],\n-                \"website\"       : store[\"permalink\"],\n-                \"lat\"           : store[\"x_coordinate\"],\n-                \"lon\"           : store[\"y_coordinate\"],\n-                \"street\"        : store[\"street_address_1\"] + store[\"street_address_2\"],\n-                \"city\"          : store[\"city\"],\n-                \"state\"         : store[\"state\"],\n-                \"postcode\"      : store[\"zip_code\"]\n+                \"website\": f'https://olo.tacocabana.com/menu/{store[\"slug\"]}?showInfoModal=true',\n+                \"ref\": store[\"brand_id\"],\n+                \"lat\": store[\"latitude\"],\n+                \"lon\": store[\"longitude\"],\n+                \"addr_full\": store[\"street_address\"],\n+                \"city\": store[\"city\"],\n+                \"state\": store[\"cached_data\"][\"state\"],\n+                \"country\": store[\"country\"],\n+                \"postcode\": store[\"zip_code\"],\n+                \"phone\": store[\"phone_number\"],\n             }\n-            \n             yield GeojsonPointItem(**properties)\n-        \n-        else:\n-            self.logger.info(\"No results\")\n+\n+        next_url = data[\"meta\"][\"pagination\"][\"links\"][\"next\"]\n+        if next_url:\n+            yield self.request(next_url)\n", "issue": "Spider tacocabana is broken\nDuring the global build at 2021-05-26-14-42-23, spider **tacocabana** failed with **0 features** and **1 errors**.\n\nHere's [the log](https://data.alltheplaces.xyz/runs/2021-05-26-14-42-23/logs/tacocabana.log) and [the output](https://data.alltheplaces.xyz/runs/2021-05-26-14-42-23/output/tacocabana.geojson) ([on a map](https://data.alltheplaces.xyz/map.html?show=https://data.alltheplaces.xyz/runs/2021-05-26-14-42-23/output/tacocabana.geojson))\n", "before_files": [{"content": "# -*- coding: utf-8 -*-\nimport scrapy\nimport json\nimport re\n\nfrom locations.items import GeojsonPointItem\n\nclass TacocabanaSpider(scrapy.Spider):\n    name = \"tacocabana\"\n    item_attributes = { 'brand': \"Taco Cabana\" }\n    allowed_domains = [\"www.tacocabana.com\"]\n    start_urls = (\n        \"http://www.tacocabana.com/wp-admin/admin-ajax.php?action=get_ajax_processor&processor=get-locations&queryType=&postID=816\",\n    )\n        \n    def parse(self, response):\n        data = json.loads(re.sub(r\"\\s<.*?>.*<.*?>\\s\", \"\", response.body_as_unicode()))\n\n        for store in data:\n            properties = {\n                \"phone\"         : store[\"phone_number\"],\n                \"ref\"           : str(store[\"locator_store_number\"]),\n                \"name\"          : store[\"post_title\"],\n                \"opening_hours\" : store[\"hours\"],\n                \"website\"       : store[\"permalink\"],\n                \"lat\"           : store[\"x_coordinate\"],\n                \"lon\"           : store[\"y_coordinate\"],\n                \"street\"        : store[\"street_address_1\"] + store[\"street_address_2\"],\n                \"city\"          : store[\"city\"],\n                \"state\"         : store[\"state\"],\n                \"postcode\"      : store[\"zip_code\"]\n            }\n            \n            yield GeojsonPointItem(**properties)\n        \n        else:\n            self.logger.info(\"No results\")\n", "path": "locations/spiders/tacocabana.py"}], "after_files": [{"content": "# -*- coding: utf-8 -*-\nimport scrapy\n\nfrom locations.items import GeojsonPointItem\n\n\nclass TacocabanaSpider(scrapy.Spider):\n    name = \"tacocabana\"\n    item_attributes = {\"brand\": \"Taco Cabana\"}\n    allowed_domains = [\"api.koala.fuzzhq.com\"]\n\n    def start_requests(self):\n        yield scrapy.http.JsonRequest(\n            \"https://api.koala.fuzzhq.com/oauth/access_token\",\n            data={\n                \"client_id\": \"3nA4STkGif0fZGApqxMlVewy3h8HN6Fsy7jVOACP\",\n                \"client_secret\": \"8oBU5gWiNg04zYzz61hN3ETrTIzvmbGyeLCX0F1s\",\n                \"grant_type\": \"ordering_app_credentials\",\n                \"scope\": \"group:ordering_app\",\n            },\n            callback=self.fetch_locations,\n        )\n\n    def fetch_locations(self, response):\n        self.access_token = response.json()[\"access_token\"]\n        yield self.request(\n            \"https://api.koala.fuzzhq.com/v1/ordering/store-locations/?include[]=operating_hours&include[]=attributes&per_page=50\"\n        )\n\n    def request(self, url):\n        return scrapy.Request(\n            url, headers={\"Authorization\": f\"Bearer {self.access_token}\"}\n        )\n\n    def parse(self, response):\n        data = response.json()\n\n        for store in data[\"data\"]:\n            properties = {\n                \"website\": f'https://olo.tacocabana.com/menu/{store[\"slug\"]}?showInfoModal=true',\n                \"ref\": store[\"brand_id\"],\n                \"lat\": store[\"latitude\"],\n                \"lon\": store[\"longitude\"],\n                \"addr_full\": store[\"street_address\"],\n                \"city\": store[\"city\"],\n                \"state\": store[\"cached_data\"][\"state\"],\n                \"country\": store[\"country\"],\n                \"postcode\": store[\"zip_code\"],\n                \"phone\": store[\"phone_number\"],\n            }\n            yield GeojsonPointItem(**properties)\n\n        next_url = data[\"meta\"][\"pagination\"][\"links\"][\"next\"]\n        if next_url:\n            yield self.request(next_url)\n", "path": "locations/spiders/tacocabana.py"}]}