prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  Spider officedepot is broken
  During the global build at 2021-08-18-14-42-26, spider **officedepot** failed with **0 features** and **0 errors**.
  
  Here's [the log](https://data.alltheplaces.xyz/runs/2021-08-18-14-42-26/logs/officedepot.txt) and [the output](https://data.alltheplaces.xyz/runs/2021-08-18-14-42-26/output/officedepot.geojson) ([on a map](https://data.alltheplaces.xyz/map.html?show=https://data.alltheplaces.xyz/runs/2021-08-18-14-42-26/output/officedepot.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/officedepot.py`
  Content:
  ```
  1 # -*- coding: utf-8 -*-
  2 import scrapy
  3 
  4 from locations.items import GeojsonPointItem
  5 from locations.hours import OpeningHours
  6 
  7 
  8 class OfficedepotSpider(scrapy.Spider):
  9     name = 'officedepot'
  10     allowed_domains = ['www.officedepot.com']
  11     start_urls = ['https://www.officedepot.com/storelocator/states/']
  12 
  13     def parse_store(self, response):
  14         o = OpeningHours()
  15         for d in response.xpath('//time[@itemprop="openingHours"]/@datetime').extract():
  16             day, times = d.split(' ', 1)
  17             s, f = times.split('-')
  18 
  19             # They seem to have a bug where they put down 24:00 when they mean noon
  20             if s == '24:00': s = '12:00'
  21 
  22             o.add_range(day, s, f)
  23 
  24 
  25         store_number_results = response.xpath('//dt[@class="lsp_number"]/text()')
  26         if store_number_results:
  27             ref = store_number_results[-1].extract().strip()
  28 
  29         yield GeojsonPointItem(
  30             lat=response.xpath('//meta[@itemprop="latitude"]/@content').extract_first(),
  31             lon=response.xpath('//meta[@itemprop="longitude"]/@content').extract_first(),
  32             phone=response.xpath('//p[@itemprop="telephone"]/text()').extract_first(),
  33             addr_full=response.xpath('//p[@itemprop="streetAddress"]/text()').extract_first(),
  34             city=response.xpath('//p[@itemprop="addressLocality"]/text()').extract_first(),
  35             state=response.xpath('//p[@itemprop="addressRegion"]/text()').extract_first(),
  36             postcode=response.xpath('//p[@itemprop="postalCode"]/text()').extract_first(),
  37             website=response.url,
  38             ref=ref,
  39             opening_hours=o.as_opening_hours(),
  40         )
  41 
  42     def parse(self, response):
  43         for state in response.xpath('//div[@style="float: left; width: 200px;"]/a/@href').extract():
  44             yield scrapy.Request(
  45                 response.urljoin(state),
  46                 callback=self.parse,
  47             )
  48 
  49         for store in response.xpath('//div[@style="float: left; width: 300px; padding-top: 10px;"]/a/@href').extract():
  50             yield scrapy.Request(
  51                 response.urljoin(store),
  52                 callback=self.parse_store,
  53             )
  54
  ```
  --- 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/officedepot.py b/locations/spiders/officedepot.py
  --- a/locations/spiders/officedepot.py
  +++ b/locations/spiders/officedepot.py
  @@ -1,4 +1,5 @@
   # -*- coding: utf-8 -*-
  +import json
   import scrapy
   
   from locations.items import GeojsonPointItem
  @@ -7,8 +8,41 @@
   
   class OfficedepotSpider(scrapy.Spider):
       name = 'officedepot'
  -    allowed_domains = ['www.officedepot.com']
  -    start_urls = ['https://www.officedepot.com/storelocator/states/']
  +    allowed_domains = ["where2getit.com"]
  +
  +    def start_requests(self):
  +        url = 'https://locations.where2getit.com/officedepot/rest/getlist?like=0.9145201524205426&lang=en_US'
  +
  +        headers = {
  +            'Accept-Language': 'en-US,en;q=0.9',
  +            'Origin': 'https://hosted.where2getit.com',
  +            'Accept-Encoding': 'gzip, deflate, br',
  +            'Accept': 'application/json, text/javascript, */*; q=0.01',
  +            'Referer': 'https://hosted.where2getit.com/officedepot/2015/index1.html',
  +            'Connection': 'keep-alive',
  +            'Content-Type': 'application/json',
  +        }
  +
  +        form_data = {
  +            "request": {
  +                "appkey": "592778B0-A13B-11EB-B3DB-84030D516365",
  +                "formdata": {
  +                    "order": "city",
  +                    "objectname": "Locator::Store",
  +                    "softmatch": "1",
  +                    "where": {
  +                    }
  +                }
  +            }
  +        }
  +
  +        yield scrapy.http.FormRequest(
  +            url=url,
  +            method='POST',
  +            body=json.dumps(form_data),
  +            headers=headers,
  +            callback=self.parse,
  +        )
   
       def parse_store(self, response):
           o = OpeningHours()
  @@ -40,14 +74,20 @@
           )
   
       def parse(self, response):
  -        for state in response.xpath('//div[@style="float: left; width: 200px;"]/a/@href').extract():
  -            yield scrapy.Request(
  -                response.urljoin(state),
  -                callback=self.parse,
  -            )
  -
  -        for store in response.xpath('//div[@style="float: left; width: 300px; padding-top: 10px;"]/a/@href').extract():
  -            yield scrapy.Request(
  -                response.urljoin(store),
  -                callback=self.parse_store,
  -            )
  +        data = json.loads(response.body_as_unicode())
  +
  +        for store in data["response"]["collection"]:
  +            properties = {
  +                'ref': store["clientkey"],
  +                'name': store.get("name"),
  +                'addr_full': store["address1"],
  +                'city': store["city"],
  +                'state': store["state"],
  +                'postcode': store["postalcode"],
  +                'country': store["country"],
  +                'lat': store["latitude"],
  +                'lon': store["longitude"],
  +                'phone': store["phone"],
  +            }
  +
  +            yield GeojsonPointItem(**properties)
  
verification_info: {"golden_diff": "diff --git a/locations/spiders/officedepot.py b/locations/spiders/officedepot.py\n--- a/locations/spiders/officedepot.py\n+++ b/locations/spiders/officedepot.py\n@@ -1,4 +1,5 @@\n # -*- coding: utf-8 -*-\n+import json\n import scrapy\n \n from locations.items import GeojsonPointItem\n@@ -7,8 +8,41 @@\n \n class OfficedepotSpider(scrapy.Spider):\n     name = 'officedepot'\n-    allowed_domains = ['www.officedepot.com']\n-    start_urls = ['https://www.officedepot.com/storelocator/states/']\n+    allowed_domains = [\"where2getit.com\"]\n+\n+    def start_requests(self):\n+        url = 'https://locations.where2getit.com/officedepot/rest/getlist?like=0.9145201524205426&lang=en_US'\n+\n+        headers = {\n+            'Accept-Language': 'en-US,en;q=0.9',\n+            'Origin': 'https://hosted.where2getit.com',\n+            'Accept-Encoding': 'gzip, deflate, br',\n+            'Accept': 'application/json, text/javascript, */*; q=0.01',\n+            'Referer': 'https://hosted.where2getit.com/officedepot/2015/index1.html',\n+            'Connection': 'keep-alive',\n+            'Content-Type': 'application/json',\n+        }\n+\n+        form_data = {\n+            \"request\": {\n+                \"appkey\": \"592778B0-A13B-11EB-B3DB-84030D516365\",\n+                \"formdata\": {\n+                    \"order\": \"city\",\n+                    \"objectname\": \"Locator::Store\",\n+                    \"softmatch\": \"1\",\n+                    \"where\": {\n+                    }\n+                }\n+            }\n+        }\n+\n+        yield scrapy.http.FormRequest(\n+            url=url,\n+            method='POST',\n+            body=json.dumps(form_data),\n+            headers=headers,\n+            callback=self.parse,\n+        )\n \n     def parse_store(self, response):\n         o = OpeningHours()\n@@ -40,14 +74,20 @@\n         )\n \n     def parse(self, response):\n-        for state in response.xpath('//div[@style=\"float: left; width: 200px;\"]/a/@href').extract():\n-            yield scrapy.Request(\n-                response.urljoin(state),\n-                callback=self.parse,\n-            )\n-\n-        for store in response.xpath('//div[@style=\"float: left; width: 300px; padding-top: 10px;\"]/a/@href').extract():\n-            yield scrapy.Request(\n-                response.urljoin(store),\n-                callback=self.parse_store,\n-            )\n+        data = json.loads(response.body_as_unicode())\n+\n+        for store in data[\"response\"][\"collection\"]:\n+            properties = {\n+                'ref': store[\"clientkey\"],\n+                'name': store.get(\"name\"),\n+                'addr_full': store[\"address1\"],\n+                'city': store[\"city\"],\n+                'state': store[\"state\"],\n+                'postcode': store[\"postalcode\"],\n+                'country': store[\"country\"],\n+                'lat': store[\"latitude\"],\n+                'lon': store[\"longitude\"],\n+                'phone': store[\"phone\"],\n+            }\n+\n+            yield GeojsonPointItem(**properties)\n", "issue": "Spider officedepot is broken\nDuring the global build at 2021-08-18-14-42-26, spider **officedepot** failed with **0 features** and **0 errors**.\n\nHere's [the log](https://data.alltheplaces.xyz/runs/2021-08-18-14-42-26/logs/officedepot.txt) and [the output](https://data.alltheplaces.xyz/runs/2021-08-18-14-42-26/output/officedepot.geojson) ([on a map](https://data.alltheplaces.xyz/map.html?show=https://data.alltheplaces.xyz/runs/2021-08-18-14-42-26/output/officedepot.geojson))\n", "before_files": [{"content": "# -*- coding: utf-8 -*-\nimport scrapy\n\nfrom locations.items import GeojsonPointItem\nfrom locations.hours import OpeningHours\n\n\nclass OfficedepotSpider(scrapy.Spider):\n    name = 'officedepot'\n    allowed_domains = ['www.officedepot.com']\n    start_urls = ['https://www.officedepot.com/storelocator/states/']\n\n    def parse_store(self, response):\n        o = OpeningHours()\n        for d in response.xpath('//time[@itemprop=\"openingHours\"]/@datetime').extract():\n            day, times = d.split(' ', 1)\n            s, f = times.split('-')\n\n            # They seem to have a bug where they put down 24:00 when they mean noon\n            if s == '24:00': s = '12:00'\n\n            o.add_range(day, s, f)\n\n\n        store_number_results = response.xpath('//dt[@class=\"lsp_number\"]/text()')\n        if store_number_results:\n            ref = store_number_results[-1].extract().strip()\n\n        yield GeojsonPointItem(\n            lat=response.xpath('//meta[@itemprop=\"latitude\"]/@content').extract_first(),\n            lon=response.xpath('//meta[@itemprop=\"longitude\"]/@content').extract_first(),\n            phone=response.xpath('//p[@itemprop=\"telephone\"]/text()').extract_first(),\n            addr_full=response.xpath('//p[@itemprop=\"streetAddress\"]/text()').extract_first(),\n            city=response.xpath('//p[@itemprop=\"addressLocality\"]/text()').extract_first(),\n            state=response.xpath('//p[@itemprop=\"addressRegion\"]/text()').extract_first(),\n            postcode=response.xpath('//p[@itemprop=\"postalCode\"]/text()').extract_first(),\n            website=response.url,\n            ref=ref,\n            opening_hours=o.as_opening_hours(),\n        )\n\n    def parse(self, response):\n        for state in response.xpath('//div[@style=\"float: left; width: 200px;\"]/a/@href').extract():\n            yield scrapy.Request(\n                response.urljoin(state),\n                callback=self.parse,\n            )\n\n        for store in response.xpath('//div[@style=\"float: left; width: 300px; padding-top: 10px;\"]/a/@href').extract():\n            yield scrapy.Request(\n                response.urljoin(store),\n                callback=self.parse_store,\n            )\n", "path": "locations/spiders/officedepot.py"}], "after_files": [{"content": "# -*- coding: utf-8 -*-\nimport json\nimport scrapy\n\nfrom locations.items import GeojsonPointItem\nfrom locations.hours import OpeningHours\n\n\nclass OfficedepotSpider(scrapy.Spider):\n    name = 'officedepot'\n    allowed_domains = [\"where2getit.com\"]\n\n    def start_requests(self):\n        url = 'https://locations.where2getit.com/officedepot/rest/getlist?like=0.9145201524205426&lang=en_US'\n\n        headers = {\n            'Accept-Language': 'en-US,en;q=0.9',\n            'Origin': 'https://hosted.where2getit.com',\n            'Accept-Encoding': 'gzip, deflate, br',\n            'Accept': 'application/json, text/javascript, */*; q=0.01',\n            'Referer': 'https://hosted.where2getit.com/officedepot/2015/index1.html',\n            'Connection': 'keep-alive',\n            'Content-Type': 'application/json',\n        }\n\n        form_data = {\n            \"request\": {\n                \"appkey\": \"592778B0-A13B-11EB-B3DB-84030D516365\",\n                \"formdata\": {\n                    \"order\": \"city\",\n                    \"objectname\": \"Locator::Store\",\n                    \"softmatch\": \"1\",\n                    \"where\": {\n                    }\n                }\n            }\n        }\n\n        yield scrapy.http.FormRequest(\n            url=url,\n            method='POST',\n            body=json.dumps(form_data),\n            headers=headers,\n            callback=self.parse,\n        )\n\n    def parse_store(self, response):\n        o = OpeningHours()\n        for d in response.xpath('//time[@itemprop=\"openingHours\"]/@datetime').extract():\n            day, times = d.split(' ', 1)\n            s, f = times.split('-')\n\n            # They seem to have a bug where they put down 24:00 when they mean noon\n            if s == '24:00': s = '12:00'\n\n            o.add_range(day, s, f)\n\n\n        store_number_results = response.xpath('//dt[@class=\"lsp_number\"]/text()')\n        if store_number_results:\n            ref = store_number_results[-1].extract().strip()\n\n        yield GeojsonPointItem(\n            lat=response.xpath('//meta[@itemprop=\"latitude\"]/@content').extract_first(),\n            lon=response.xpath('//meta[@itemprop=\"longitude\"]/@content').extract_first(),\n            phone=response.xpath('//p[@itemprop=\"telephone\"]/text()').extract_first(),\n            addr_full=response.xpath('//p[@itemprop=\"streetAddress\"]/text()').extract_first(),\n            city=response.xpath('//p[@itemprop=\"addressLocality\"]/text()').extract_first(),\n            state=response.xpath('//p[@itemprop=\"addressRegion\"]/text()').extract_first(),\n            postcode=response.xpath('//p[@itemprop=\"postalCode\"]/text()').extract_first(),\n            website=response.url,\n            ref=ref,\n            opening_hours=o.as_opening_hours(),\n        )\n\n    def parse(self, response):\n        data = json.loads(response.body_as_unicode())\n\n        for store in data[\"response\"][\"collection\"]:\n            properties = {\n                'ref': store[\"clientkey\"],\n                'name': store.get(\"name\"),\n                'addr_full': store[\"address1\"],\n                'city': store[\"city\"],\n                'state': store[\"state\"],\n                'postcode': store[\"postalcode\"],\n                'country': store[\"country\"],\n                'lat': store[\"latitude\"],\n                'lon': store[\"longitude\"],\n                'phone': store[\"phone\"],\n            }\n\n            yield GeojsonPointItem(**properties)\n", "path": "locations/spiders/officedepot.py"}]}