prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  Spider afcurgentcare is broken
  During the global build at 2021-05-21-20-28-08, spider **afcurgentcare** failed with **0 features** and **0 errors**.
  
  Here's [the log](https://data.alltheplaces.xyz/runs/2021-05-21-20-28-08/logs/afcurgentcare.log) and [the output](https://data.alltheplaces.xyz/runs/2021-05-21-20-28-08/output/afcurgentcare.geojson) ([on a map](https://data.alltheplaces.xyz/map.html?show=https://data.alltheplaces.xyz/runs/2021-05-21-20-28-08/output/afcurgentcare.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/afcurgentcare.py`
  Content:
  ```
  1 import json
  2 import re
  3 import scrapy
  4 from locations.items import GeojsonPointItem
  5 from locations.hours import OpeningHours
  6 
  7 class AfcUrgentCareSpider(scrapy.Spider):
  8     name = "afcurgentcare"
  9     item_attributes = { 'brand': "AFC Urgent Care" }
  10     allowed_domains = ["afcurgentcare.com"]
  11     download_delay = 0.2
  12     start_urls = (
  13         'https://www.afcurgentcare.com/locations/',
  14     )
  15 
  16     def parse(self, response):
  17         for url in response.xpath('//li[@class="location"]/@data-href').extract():
  18             yield scrapy.Request(
  19                 response.urljoin(url),
  20                 callback=self.parse_store,
  21             )
  22 
  23     def parse_store(self, response):
  24         properties = {
  25             'ref': response.url,
  26             'lat': response.xpath('//div[@class="map-container"]/div/@data-latitude').extract_first(),
  27             'lon': response.xpath('//div[@class="map-container"]/div/@data-longitude').extract_first(),
  28             'phone': response.xpath('//a[@class="phone-link"]/span/text()').extract_first(),
  29             'addr_full': response.xpath('//span[@itemprop="streetAddress"]/text()').extract_first().strip(),
  30             'name': response.xpath('//meta[@itemprop="name legalName"]/@content').extract_first(),
  31             'city': response.xpath('//span[@itemprop="addressLocality"]/text()').extract_first()[:-1],
  32             'state': response.xpath('//span[@itemprop="addressRegion"]/text()').extract_first().strip(),
  33             'postcode': response.xpath('//span[@itemprop="postalCode"]/text()').extract_first().strip(),
  34         }
  35 
  36         o = OpeningHours()
  37         for h in response.css('#LocalMapAreaOpenHourBanner li.h-day'):
  38             day = h.xpath('em/span/text()').extract_first().strip()[:2]
  39             day_range = h.xpath('em/text()').extract_first().strip(':').strip()
  40             open_time, close_time = day_range.split(' - ')
  41 
  42             o.add_range(day, open_time, close_time, '%I:%M %p')
  43         properties['opening_hours'] = o.as_opening_hours()
  44 
  45         yield GeojsonPointItem(**properties)
  46
  ```
  --- 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/afcurgentcare.py b/locations/spiders/afcurgentcare.py
  --- a/locations/spiders/afcurgentcare.py
  +++ b/locations/spiders/afcurgentcare.py
  @@ -1,45 +1,48 @@
   import json
  -import re
  +import urllib.parse
  +
   import scrapy
  +
   from locations.items import GeojsonPointItem
  -from locations.hours import OpeningHours
  +from locations.hours import OpeningHours, DAYS
  +
   
   class AfcUrgentCareSpider(scrapy.Spider):
       name = "afcurgentcare"
  -    item_attributes = { 'brand': "AFC Urgent Care" }
  +    item_attributes = {"brand": "AFC Urgent Care"}
       allowed_domains = ["afcurgentcare.com"]
  -    download_delay = 0.2
       start_urls = (
  -        'https://www.afcurgentcare.com/locations/',
  +        "https://www.afcurgentcare.com/modules/multilocation/?near_lat=39&near_lon=-98",
       )
   
       def parse(self, response):
  -        for url in response.xpath('//li[@class="location"]/@data-href').extract():
  -            yield scrapy.Request(
  -                response.urljoin(url),
  -                callback=self.parse_store,
  -            )
  +        j = json.loads(response.body)
  +        if j["meta"]["next"] is not None:
  +            qs = "?" + urllib.parse.urlparse(j["meta"]["next"]).query
  +            yield scrapy.Request(urllib.parse.urljoin(response.url, qs))
  +        for obj in j["objects"]:
  +            yield from self.parse_store(obj)
   
  -    def parse_store(self, response):
  +    def parse_store(self, obj):
           properties = {
  -            'ref': response.url,
  -            'lat': response.xpath('//div[@class="map-container"]/div/@data-latitude').extract_first(),
  -            'lon': response.xpath('//div[@class="map-container"]/div/@data-longitude').extract_first(),
  -            'phone': response.xpath('//a[@class="phone-link"]/span/text()').extract_first(),
  -            'addr_full': response.xpath('//span[@itemprop="streetAddress"]/text()').extract_first().strip(),
  -            'name': response.xpath('//meta[@itemprop="name legalName"]/@content').extract_first(),
  -            'city': response.xpath('//span[@itemprop="addressLocality"]/text()').extract_first()[:-1],
  -            'state': response.xpath('//span[@itemprop="addressRegion"]/text()').extract_first().strip(),
  -            'postcode': response.xpath('//span[@itemprop="postalCode"]/text()').extract_first().strip(),
  +            "ref": obj["id"],
  +            "lat": obj["lat"],
  +            "lon": obj["lon"],
  +            "phone": obj["phonemap_e164"].get("phone"),
  +            "addr_full": obj["street"],
  +            "name": obj["location_name"],
  +            "city": obj["city"],
  +            "state": obj["state"],
  +            "postcode": obj["postal_code"],
  +            "website": obj["location_url"],
           }
   
           o = OpeningHours()
  -        for h in response.css('#LocalMapAreaOpenHourBanner li.h-day'):
  -            day = h.xpath('em/span/text()').extract_first().strip()[:2]
  -            day_range = h.xpath('em/text()').extract_first().strip(':').strip()
  -            open_time, close_time = day_range.split(' - ')
  -
  -            o.add_range(day, open_time, close_time, '%I:%M %p')
  -        properties['opening_hours'] = o.as_opening_hours()
  +        for ([h, _], day) in zip(obj["hours_of_operation"], DAYS):
  +            if not h:
  +                continue
  +            open_time, close_time = h
  +            o.add_range(day, open_time, close_time, "%H:%M:%S")
  +        properties["opening_hours"] = o.as_opening_hours()
   
           yield GeojsonPointItem(**properties)
  
verification_info: {"golden_diff": "diff --git a/locations/spiders/afcurgentcare.py b/locations/spiders/afcurgentcare.py\n--- a/locations/spiders/afcurgentcare.py\n+++ b/locations/spiders/afcurgentcare.py\n@@ -1,45 +1,48 @@\n import json\n-import re\n+import urllib.parse\n+\n import scrapy\n+\n from locations.items import GeojsonPointItem\n-from locations.hours import OpeningHours\n+from locations.hours import OpeningHours, DAYS\n+\n \n class AfcUrgentCareSpider(scrapy.Spider):\n     name = \"afcurgentcare\"\n-    item_attributes = { 'brand': \"AFC Urgent Care\" }\n+    item_attributes = {\"brand\": \"AFC Urgent Care\"}\n     allowed_domains = [\"afcurgentcare.com\"]\n-    download_delay = 0.2\n     start_urls = (\n-        'https://www.afcurgentcare.com/locations/',\n+        \"https://www.afcurgentcare.com/modules/multilocation/?near_lat=39&near_lon=-98\",\n     )\n \n     def parse(self, response):\n-        for url in response.xpath('//li[@class=\"location\"]/@data-href').extract():\n-            yield scrapy.Request(\n-                response.urljoin(url),\n-                callback=self.parse_store,\n-            )\n+        j = json.loads(response.body)\n+        if j[\"meta\"][\"next\"] is not None:\n+            qs = \"?\" + urllib.parse.urlparse(j[\"meta\"][\"next\"]).query\n+            yield scrapy.Request(urllib.parse.urljoin(response.url, qs))\n+        for obj in j[\"objects\"]:\n+            yield from self.parse_store(obj)\n \n-    def parse_store(self, response):\n+    def parse_store(self, obj):\n         properties = {\n-            'ref': response.url,\n-            'lat': response.xpath('//div[@class=\"map-container\"]/div/@data-latitude').extract_first(),\n-            'lon': response.xpath('//div[@class=\"map-container\"]/div/@data-longitude').extract_first(),\n-            'phone': response.xpath('//a[@class=\"phone-link\"]/span/text()').extract_first(),\n-            'addr_full': response.xpath('//span[@itemprop=\"streetAddress\"]/text()').extract_first().strip(),\n-            'name': response.xpath('//meta[@itemprop=\"name legalName\"]/@content').extract_first(),\n-            'city': response.xpath('//span[@itemprop=\"addressLocality\"]/text()').extract_first()[:-1],\n-            'state': response.xpath('//span[@itemprop=\"addressRegion\"]/text()').extract_first().strip(),\n-            'postcode': response.xpath('//span[@itemprop=\"postalCode\"]/text()').extract_first().strip(),\n+            \"ref\": obj[\"id\"],\n+            \"lat\": obj[\"lat\"],\n+            \"lon\": obj[\"lon\"],\n+            \"phone\": obj[\"phonemap_e164\"].get(\"phone\"),\n+            \"addr_full\": obj[\"street\"],\n+            \"name\": obj[\"location_name\"],\n+            \"city\": obj[\"city\"],\n+            \"state\": obj[\"state\"],\n+            \"postcode\": obj[\"postal_code\"],\n+            \"website\": obj[\"location_url\"],\n         }\n \n         o = OpeningHours()\n-        for h in response.css('#LocalMapAreaOpenHourBanner li.h-day'):\n-            day = h.xpath('em/span/text()').extract_first().strip()[:2]\n-            day_range = h.xpath('em/text()').extract_first().strip(':').strip()\n-            open_time, close_time = day_range.split(' - ')\n-\n-            o.add_range(day, open_time, close_time, '%I:%M %p')\n-        properties['opening_hours'] = o.as_opening_hours()\n+        for ([h, _], day) in zip(obj[\"hours_of_operation\"], DAYS):\n+            if not h:\n+                continue\n+            open_time, close_time = h\n+            o.add_range(day, open_time, close_time, \"%H:%M:%S\")\n+        properties[\"opening_hours\"] = o.as_opening_hours()\n \n         yield GeojsonPointItem(**properties)\n", "issue": "Spider afcurgentcare is broken\nDuring the global build at 2021-05-21-20-28-08, spider **afcurgentcare** failed with **0 features** and **0 errors**.\n\nHere's [the log](https://data.alltheplaces.xyz/runs/2021-05-21-20-28-08/logs/afcurgentcare.log) and [the output](https://data.alltheplaces.xyz/runs/2021-05-21-20-28-08/output/afcurgentcare.geojson) ([on a map](https://data.alltheplaces.xyz/map.html?show=https://data.alltheplaces.xyz/runs/2021-05-21-20-28-08/output/afcurgentcare.geojson))\n", "before_files": [{"content": "import json\nimport re\nimport scrapy\nfrom locations.items import GeojsonPointItem\nfrom locations.hours import OpeningHours\n\nclass AfcUrgentCareSpider(scrapy.Spider):\n    name = \"afcurgentcare\"\n    item_attributes = { 'brand': \"AFC Urgent Care\" }\n    allowed_domains = [\"afcurgentcare.com\"]\n    download_delay = 0.2\n    start_urls = (\n        'https://www.afcurgentcare.com/locations/',\n    )\n\n    def parse(self, response):\n        for url in response.xpath('//li[@class=\"location\"]/@data-href').extract():\n            yield scrapy.Request(\n                response.urljoin(url),\n                callback=self.parse_store,\n            )\n\n    def parse_store(self, response):\n        properties = {\n            'ref': response.url,\n            'lat': response.xpath('//div[@class=\"map-container\"]/div/@data-latitude').extract_first(),\n            'lon': response.xpath('//div[@class=\"map-container\"]/div/@data-longitude').extract_first(),\n            'phone': response.xpath('//a[@class=\"phone-link\"]/span/text()').extract_first(),\n            'addr_full': response.xpath('//span[@itemprop=\"streetAddress\"]/text()').extract_first().strip(),\n            'name': response.xpath('//meta[@itemprop=\"name legalName\"]/@content').extract_first(),\n            'city': response.xpath('//span[@itemprop=\"addressLocality\"]/text()').extract_first()[:-1],\n            'state': response.xpath('//span[@itemprop=\"addressRegion\"]/text()').extract_first().strip(),\n            'postcode': response.xpath('//span[@itemprop=\"postalCode\"]/text()').extract_first().strip(),\n        }\n\n        o = OpeningHours()\n        for h in response.css('#LocalMapAreaOpenHourBanner li.h-day'):\n            day = h.xpath('em/span/text()').extract_first().strip()[:2]\n            day_range = h.xpath('em/text()').extract_first().strip(':').strip()\n            open_time, close_time = day_range.split(' - ')\n\n            o.add_range(day, open_time, close_time, '%I:%M %p')\n        properties['opening_hours'] = o.as_opening_hours()\n\n        yield GeojsonPointItem(**properties)\n", "path": "locations/spiders/afcurgentcare.py"}], "after_files": [{"content": "import json\nimport urllib.parse\n\nimport scrapy\n\nfrom locations.items import GeojsonPointItem\nfrom locations.hours import OpeningHours, DAYS\n\n\nclass AfcUrgentCareSpider(scrapy.Spider):\n    name = \"afcurgentcare\"\n    item_attributes = {\"brand\": \"AFC Urgent Care\"}\n    allowed_domains = [\"afcurgentcare.com\"]\n    start_urls = (\n        \"https://www.afcurgentcare.com/modules/multilocation/?near_lat=39&near_lon=-98\",\n    )\n\n    def parse(self, response):\n        j = json.loads(response.body)\n        if j[\"meta\"][\"next\"] is not None:\n            qs = \"?\" + urllib.parse.urlparse(j[\"meta\"][\"next\"]).query\n            yield scrapy.Request(urllib.parse.urljoin(response.url, qs))\n        for obj in j[\"objects\"]:\n            yield from self.parse_store(obj)\n\n    def parse_store(self, obj):\n        properties = {\n            \"ref\": obj[\"id\"],\n            \"lat\": obj[\"lat\"],\n            \"lon\": obj[\"lon\"],\n            \"phone\": obj[\"phonemap_e164\"].get(\"phone\"),\n            \"addr_full\": obj[\"street\"],\n            \"name\": obj[\"location_name\"],\n            \"city\": obj[\"city\"],\n            \"state\": obj[\"state\"],\n            \"postcode\": obj[\"postal_code\"],\n            \"website\": obj[\"location_url\"],\n        }\n\n        o = OpeningHours()\n        for ([h, _], day) in zip(obj[\"hours_of_operation\"], DAYS):\n            if not h:\n                continue\n            open_time, close_time = h\n            o.add_range(day, open_time, close_time, \"%H:%M:%S\")\n        properties[\"opening_hours\"] = o.as_opening_hours()\n\n        yield GeojsonPointItem(**properties)\n", "path": "locations/spiders/afcurgentcare.py"}]}