prompt: 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-07-14-14-42-22, spider **verizon** failed with **4611 features** and **1645 errors**.
  
  Here's [the log](https://data.alltheplaces.xyz/runs/2021-07-14-14-42-22/logs/verizon.txt) and [the output](https://data.alltheplaces.xyz/runs/2021-07-14-14-42-22/output/verizon.geojson) ([on a map](https://data.alltheplaces.xyz/map.html?show=https://data.alltheplaces.xyz/runs/2021-07-14-14-42-22/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             yield scrapy.Request(url, callback=self.parse_store)
  66 
  67     def parse_store(self, response):
  68         script = response.xpath('//script[contains(text(), "storeJSON")]/text()').extract_first()
  69         store_data = json.loads(re.search(r'var storeJSON = (.*);', script).group(1))
  70 
  71         properties = {
  72                 'name': store_data["storeName"],
  73                 'ref': store_data["storeNumber"],
  74                 'addr_full': store_data["address"]["streetAddress"],
  75                 'city': store_data["address"]["addressLocality"],
  76                 'state': store_data["address"]["addressRegion"],
  77                 'postcode': store_data["address"]["postalCode"],
  78                 'country': store_data["address"]["addressCountry"],
  79                 'phone': store_data.get("telephone"),
  80                 'website': store_data.get("url") or response.url,
  81                 'lat': store_data["geo"].get("latitude"),
  82                 'lon': store_data["geo"].get("longitude"),
  83                 'extras': {
  84                     'business_name': store_data.get('posStoreDetail').get('businessName'),
  85                     'retail_id': store_data.get('retailId'),
  86                     'store_type': store_data.get('posStoreDetail').get('storeType'),
  87                     'store_type_note': store_data.get('typeOfStore')
  88                 }
  89             }
  90 
  91         hours = self.parse_hours(store_data.get("openingHoursSpecification"))
  92         if hours:
  93             properties["opening_hours"] = hours
  94 
  95         yield GeojsonPointItem(**properties)
  96
  ```
  --- 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/verizon.py b/locations/spiders/verizon.py
  --- a/locations/spiders/verizon.py
  +++ b/locations/spiders/verizon.py
  @@ -62,10 +62,15 @@
           urls = response.xpath('//url/loc/text()').extract()
   
           for url in urls:
  -            yield scrapy.Request(url, callback=self.parse_store)
  +            if url.split('/')[-2].split('-')[-1].isdigit():
  +                # Store pages have a number at the end of their URL
  +                yield scrapy.Request(url, callback=self.parse_store)
   
       def parse_store(self, response):
           script = response.xpath('//script[contains(text(), "storeJSON")]/text()').extract_first()
  +        if not script:
  +            return
  +
           store_data = json.loads(re.search(r'var storeJSON = (.*);', script).group(1))
   
           properties = {
  
verification_info: {"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@@ -62,10 +62,15 @@\n         urls = response.xpath('//url/loc/text()').extract()\n \n         for url in urls:\n-            yield scrapy.Request(url, callback=self.parse_store)\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", "issue": "Spider verizon is broken\nDuring the global build at 2021-07-14-14-42-22, spider **verizon** failed with **4611 features** and **1645 errors**.\n\nHere's [the log](https://data.alltheplaces.xyz/runs/2021-07-14-14-42-22/logs/verizon.txt) and [the output](https://data.alltheplaces.xyz/runs/2021-07-14-14-42-22/output/verizon.geojson) ([on a map](https://data.alltheplaces.xyz/map.html?show=https://data.alltheplaces.xyz/runs/2021-07-14-14-42-22/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            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        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        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"}]}