We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Spider verizon is broken
During the global build at 2021-10-27-14-42-46, spider **verizon** failed with **4573 features** and **1650 errors**.

Here's [the log](https://data.alltheplaces.xyz/runs/2021-10-27-14-42-46/logs/verizon.txt) and [the output](https://data.alltheplaces.xyz/runs/2021-10-27-14-42-46/output/verizon.geojson) ([on a map](https://data.alltheplaces.xyz/map.html?show=https://data.alltheplaces.xyz/runs/2021-10-27-14-42-46/output/verizon.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/verizon.py`
Content:
```
1 # -*- coding: utf-8 -*-
2 import scrapy
3 import json
4 import re
5 
6 from locations.items import GeojsonPointItem
7 from locations.hours import OpeningHours
8 
9 
10 class VerizonSpider(scrapy.Spider):
11     name = "verizon"
12     item_attributes = { 'brand': "Verizon" }
13     allowed_domains = ["www.verizonwireless.com"]
14     start_urls = (
15         'https://www.verizonwireless.com/sitemap_storelocator.xml',
16     )
17     custom_settings = {
18         'USER_AGENT': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.86 Safari/537.36',
19     }
20 
21     def parse_hours(self, store_hours):
22         opening_hours = OpeningHours()
23         for store_day in store_hours['dayOfWeek']:
24             if store_day.lower() == 'closed':
25                 continue
26             else:
27                 day, open_close = store_day.split('-')
28                 day = day.strip()[:2]
29                 open_time = ' '.join(open_close.strip().split(' ', 2)[0:2])
30                 if open_time.split(' ')[0].lower() == 'closed':
31                     continue
32                 elif open_time.split(' ')[0].lower() == 'null':
33                     continue
34                 else:
35                     if open_close.strip().count(' ') == 1:
36                         open_time, close_time = open_time.split(' ')
37                         opening_hours.add_range(day=day,
38                                                 open_time=open_time,
39                                                 close_time=close_time,
40                                                 time_format='%I:%M%p'
41                                                 )
42                     elif open_close.strip().count(' ') == 2:
43                         open_time = open_close.strip().split(' ')[0]
44                         close_time = ''.join(open_close.strip().split(' ')[1:3])
45                         opening_hours.add_range(day=day,
46                                                 open_time=open_time,
47                                                 close_time=close_time,
48                                                 time_format='%I:%M%p'
49                                                 )
50                     else:
51                         close_time = open_close.strip().split(' ', 2)[2]
52                         opening_hours.add_range(day=day,
53                                                 open_time=open_time,
54                                                 close_time=close_time,
55                                                 time_format='%I:%M %p'
56                                                 )
57 
58         return opening_hours.as_opening_hours()
59 
60     def parse(self, response):
61         response.selector.remove_namespaces()
62         urls = response.xpath('//url/loc/text()').extract()
63 
64         for url in urls:
65             if url.split('/')[-2].split('-')[-1].isdigit():
66                 # Store pages have a number at the end of their URL
67                 yield scrapy.Request(url, callback=self.parse_store)
68 
69     def parse_store(self, response):
70         script = response.xpath('//script[contains(text(), "storeJSON")]/text()').extract_first()
71         if not script:
72             return
73 
74         store_data = json.loads(re.search(r'var storeJSON = (.*);', script).group(1))
75 
76         properties = {
77                 'name': store_data["storeName"],
78                 'ref': store_data["storeNumber"],
79                 'addr_full': store_data["address"]["streetAddress"],
80                 'city': store_data["address"]["addressLocality"],
81                 'state': store_data["address"]["addressRegion"],
82                 'postcode': store_data["address"]["postalCode"],
83                 'country': store_data["address"]["addressCountry"],
84                 'phone': store_data.get("telephone"),
85                 'website': store_data.get("url") or response.url,
86                 'lat': store_data["geo"].get("latitude"),
87                 'lon': store_data["geo"].get("longitude"),
88                 'extras': {
89                     'business_name': store_data.get('posStoreDetail').get('businessName'),
90                     'retail_id': store_data.get('retailId'),
91                     'store_type': store_data.get('posStoreDetail').get('storeType'),
92                     'store_type_note': store_data.get('typeOfStore')
93                 }
94             }
95 
96         hours = self.parse_hours(store_data.get("openingHoursSpecification"))
97         if hours:
98             properties["opening_hours"] = hours
99 
100         yield GeojsonPointItem(**properties)
101
```
--- 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()

```

diff --git a/locations/spiders/verizon.py b/locations/spiders/verizon.py
--- a/locations/spiders/verizon.py
+++ b/locations/spiders/verizon.py
@@ -20,40 +20,18 @@
 
     def parse_hours(self, store_hours):
         opening_hours = OpeningHours()
-        for store_day in store_hours['dayOfWeek']:
-            if store_day.lower() == 'closed':
-                continue
-            else:
-                day, open_close = store_day.split('-')
-                day = day.strip()[:2]
-                open_time = ' '.join(open_close.strip().split(' ', 2)[0:2])
-                if open_time.split(' ')[0].lower() == 'closed':
-                    continue
-                elif open_time.split(' ')[0].lower() == 'null':
-                    continue
-                else:
-                    if open_close.strip().count(' ') == 1:
-                        open_time, close_time = open_time.split(' ')
-                        opening_hours.add_range(day=day,
-                                                open_time=open_time,
-                                                close_time=close_time,
-                                                time_format='%I:%M%p'
-                                                )
-                    elif open_close.strip().count(' ') == 2:
-                        open_time = open_close.strip().split(' ')[0]
-                        close_time = ''.join(open_close.strip().split(' ')[1:3])
-                        opening_hours.add_range(day=day,
-                                                open_time=open_time,
-                                                close_time=close_time,
-                                                time_format='%I:%M%p'
-                                                )
-                    else:
-                        close_time = open_close.strip().split(' ', 2)[2]
-                        opening_hours.add_range(day=day,
-                                                open_time=open_time,
-                                                close_time=close_time,
-                                                time_format='%I:%M %p'
-                                                )
+
+        for store_day in ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']:
+            open_time = store_hours.get(f'{store_day}Open')
+            close_time = store_hours.get(f'{store_day}Close')
+
+            if open_time and close_time and open_time.lower() != 'closed' and close_time.lower() != 'closed':
+                opening_hours.add_range(
+                    day=store_day[0:2],
+                    open_time=open_time,
+                    close_time=close_time,
+                    time_format='%I:%M %p'
+                )
 
         return opening_hours.as_opening_hours()
 
@@ -86,14 +64,15 @@
                 'lat': store_data["geo"].get("latitude"),
                 'lon': store_data["geo"].get("longitude"),
                 'extras': {
-                    'business_name': store_data.get('posStoreDetail').get('businessName'),
+                    # Sometimes 'postStoreDetail' exists with "None" value, usual get w/ default syntax isn't reliable
+                    'business_name': (store_data.get('posStoreDetail') or {}).get('businessName'),
                     'retail_id': store_data.get('retailId'),
-                    'store_type': store_data.get('posStoreDetail').get('storeType'),
+                    'store_type': (store_data.get('posStoreDetail') or {}).get('storeType'),
                     'store_type_note': store_data.get('typeOfStore')
                 }
             }
 
-        hours = self.parse_hours(store_data.get("openingHoursSpecification"))
+        hours = self.parse_hours(store_data.get("StoreHours"))
         if hours:
             properties["opening_hours"] = hours

{"golden_diff": "diff --git a/locations/spiders/verizon.py b/locations/spiders/verizon.py\n--- a/locations/spiders/verizon.py\n+++ b/locations/spiders/verizon.py\n@@ -20,40 +20,18 @@\n \n     def parse_hours(self, store_hours):\n         opening_hours = OpeningHours()\n-        for store_day in store_hours['dayOfWeek']:\n-            if store_day.lower() == 'closed':\n-                continue\n-            else:\n-                day, open_close = store_day.split('-')\n-                day = day.strip()[:2]\n-                open_time = ' '.join(open_close.strip().split(' ', 2)[0:2])\n-                if open_time.split(' ')[0].lower() == 'closed':\n-                    continue\n-                elif open_time.split(' ')[0].lower() == 'null':\n-                    continue\n-                else:\n-                    if open_close.strip().count(' ') == 1:\n-                        open_time, close_time = open_time.split(' ')\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-                    elif open_close.strip().count(' ') == 2:\n-                        open_time = open_close.strip().split(' ')[0]\n-                        close_time = ''.join(open_close.strip().split(' ')[1:3])\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-                    else:\n-                        close_time = open_close.strip().split(' ', 2)[2]\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+\n+        for store_day in ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']:\n+            open_time = store_hours.get(f'{store_day}Open')\n+            close_time = store_hours.get(f'{store_day}Close')\n+\n+            if open_time and close_time and open_time.lower() != 'closed' and close_time.lower() != 'closed':\n+                opening_hours.add_range(\n+                    day=store_day[0:2],\n+                    open_time=open_time,\n+                    close_time=close_time,\n+                    time_format='%I:%M %p'\n+                )\n \n         return opening_hours.as_opening_hours()\n \n@@ -86,14 +64,15 @@\n                 'lat': store_data[\"geo\"].get(\"latitude\"),\n                 'lon': store_data[\"geo\"].get(\"longitude\"),\n                 'extras': {\n-                    'business_name': store_data.get('posStoreDetail').get('businessName'),\n+                    # Sometimes 'postStoreDetail' exists with \"None\" value, usual get w/ default syntax isn't reliable\n+                    'business_name': (store_data.get('posStoreDetail') or {}).get('businessName'),\n                     'retail_id': store_data.get('retailId'),\n-                    'store_type': store_data.get('posStoreDetail').get('storeType'),\n+                    'store_type': (store_data.get('posStoreDetail') or {}).get('storeType'),\n                     'store_type_note': store_data.get('typeOfStore')\n                 }\n             }\n \n-        hours = self.parse_hours(store_data.get(\"openingHoursSpecification\"))\n+        hours = self.parse_hours(store_data.get(\"StoreHours\"))\n         if hours:\n             properties[\"opening_hours\"] = hours\n", "issue": "Spider verizon is broken\nDuring the global build at 2021-10-27-14-42-46, spider **verizon** failed with **4573 features** and **1650 errors**.\n\nHere's [the log](https://data.alltheplaces.xyz/runs/2021-10-27-14-42-46/logs/verizon.txt) and [the output](https://data.alltheplaces.xyz/runs/2021-10-27-14-42-46/output/verizon.geojson) ([on a map](https://data.alltheplaces.xyz/map.html?show=https://data.alltheplaces.xyz/runs/2021-10-27-14-42-46/output/verizon.geojson))\n", "before_files": [{"content": "# -*- coding: utf-8 -*-\nimport scrapy\nimport json\nimport re\n\nfrom locations.items import GeojsonPointItem\nfrom locations.hours import OpeningHours\n\n\nclass VerizonSpider(scrapy.Spider):\n    name = \"verizon\"\n    item_attributes = { 'brand': \"Verizon\" }\n    allowed_domains = [\"www.verizonwireless.com\"]\n    start_urls = (\n        'https://www.verizonwireless.com/sitemap_storelocator.xml',\n    )\n    custom_settings = {\n        'USER_AGENT': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.86 Safari/537.36',\n    }\n\n    def parse_hours(self, store_hours):\n        opening_hours = OpeningHours()\n        for store_day in store_hours['dayOfWeek']:\n            if store_day.lower() == 'closed':\n                continue\n            else:\n                day, open_close = store_day.split('-')\n                day = day.strip()[:2]\n                open_time = ' '.join(open_close.strip().split(' ', 2)[0:2])\n                if open_time.split(' ')[0].lower() == 'closed':\n                    continue\n                elif open_time.split(' ')[0].lower() == 'null':\n                    continue\n                else:\n                    if open_close.strip().count(' ') == 1:\n                        open_time, close_time = open_time.split(' ')\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                    elif open_close.strip().count(' ') == 2:\n                        open_time = open_close.strip().split(' ')[0]\n                        close_time = ''.join(open_close.strip().split(' ')[1:3])\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                    else:\n                        close_time = open_close.strip().split(' ', 2)[2]\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\n        return opening_hours.as_opening_hours()\n\n    def parse(self, response):\n        response.selector.remove_namespaces()\n        urls = response.xpath('//url/loc/text()').extract()\n\n        for url in urls:\n            if url.split('/')[-2].split('-')[-1].isdigit():\n                # Store pages have a number at the end of their URL\n                yield scrapy.Request(url, callback=self.parse_store)\n\n    def parse_store(self, response):\n        script = response.xpath('//script[contains(text(), \"storeJSON\")]/text()').extract_first()\n        if not script:\n            return\n\n        store_data = json.loads(re.search(r'var storeJSON = (.*);', script).group(1))\n\n        properties = {\n                'name': store_data[\"storeName\"],\n                'ref': store_data[\"storeNumber\"],\n                'addr_full': store_data[\"address\"][\"streetAddress\"],\n                'city': store_data[\"address\"][\"addressLocality\"],\n                'state': store_data[\"address\"][\"addressRegion\"],\n                'postcode': store_data[\"address\"][\"postalCode\"],\n                'country': store_data[\"address\"][\"addressCountry\"],\n                'phone': store_data.get(\"telephone\"),\n                'website': store_data.get(\"url\") or response.url,\n                'lat': store_data[\"geo\"].get(\"latitude\"),\n                'lon': store_data[\"geo\"].get(\"longitude\"),\n                'extras': {\n                    'business_name': store_data.get('posStoreDetail').get('businessName'),\n                    'retail_id': store_data.get('retailId'),\n                    'store_type': store_data.get('posStoreDetail').get('storeType'),\n                    'store_type_note': store_data.get('typeOfStore')\n                }\n            }\n\n        hours = self.parse_hours(store_data.get(\"openingHoursSpecification\"))\n        if hours:\n            properties[\"opening_hours\"] = hours\n\n        yield GeojsonPointItem(**properties)\n", "path": "locations/spiders/verizon.py"}], "after_files": [{"content": "# -*- coding: utf-8 -*-\nimport scrapy\nimport json\nimport re\n\nfrom locations.items import GeojsonPointItem\nfrom locations.hours import OpeningHours\n\n\nclass VerizonSpider(scrapy.Spider):\n    name = \"verizon\"\n    item_attributes = { 'brand': \"Verizon\" }\n    allowed_domains = [\"www.verizonwireless.com\"]\n    start_urls = (\n        'https://www.verizonwireless.com/sitemap_storelocator.xml',\n    )\n    custom_settings = {\n        'USER_AGENT': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.86 Safari/537.36',\n    }\n\n    def parse_hours(self, store_hours):\n        opening_hours = OpeningHours()\n\n        for store_day in ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']:\n            open_time = store_hours.get(f'{store_day}Open')\n            close_time = store_hours.get(f'{store_day}Close')\n\n            if open_time and close_time and open_time.lower() != 'closed' and close_time.lower() != 'closed':\n                opening_hours.add_range(\n                    day=store_day[0:2],\n                    open_time=open_time,\n                    close_time=close_time,\n                    time_format='%I:%M %p'\n                )\n\n        return opening_hours.as_opening_hours()\n\n    def parse(self, response):\n        response.selector.remove_namespaces()\n        urls = response.xpath('//url/loc/text()').extract()\n\n        for url in urls:\n            if url.split('/')[-2].split('-')[-1].isdigit():\n                # Store pages have a number at the end of their URL\n                yield scrapy.Request(url, callback=self.parse_store)\n\n    def parse_store(self, response):\n        script = response.xpath('//script[contains(text(), \"storeJSON\")]/text()').extract_first()\n        if not script:\n            return\n\n        store_data = json.loads(re.search(r'var storeJSON = (.*);', script).group(1))\n\n        properties = {\n                'name': store_data[\"storeName\"],\n                'ref': store_data[\"storeNumber\"],\n                'addr_full': store_data[\"address\"][\"streetAddress\"],\n                'city': store_data[\"address\"][\"addressLocality\"],\n                'state': store_data[\"address\"][\"addressRegion\"],\n                'postcode': store_data[\"address\"][\"postalCode\"],\n                'country': store_data[\"address\"][\"addressCountry\"],\n                'phone': store_data.get(\"telephone\"),\n                'website': store_data.get(\"url\") or response.url,\n                'lat': store_data[\"geo\"].get(\"latitude\"),\n                'lon': store_data[\"geo\"].get(\"longitude\"),\n                'extras': {\n                    # Sometimes 'postStoreDetail' exists with \"None\" value, usual get w/ default syntax isn't reliable\n                    'business_name': (store_data.get('posStoreDetail') or {}).get('businessName'),\n                    'retail_id': store_data.get('retailId'),\n                    'store_type': (store_data.get('posStoreDetail') or {}).get('storeType'),\n                    'store_type_note': store_data.get('typeOfStore')\n                }\n            }\n\n        hours = self.parse_hours(store_data.get(\"StoreHours\"))\n        if hours:\n            properties[\"opening_hours\"] = hours\n\n        yield GeojsonPointItem(**properties)\n", "path": "locations/spiders/verizon.py"}]}