We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Spider rentacenter is broken
During the global build at 2021-05-26-14-42-23, spider **rentacenter** failed with **2196 features** and **1 errors**.

Here's [the log](https://data.alltheplaces.xyz/runs/2021-05-26-14-42-23/logs/rentacenter.log) and [the output](https://data.alltheplaces.xyz/runs/2021-05-26-14-42-23/output/rentacenter.geojson) ([on a map](https://data.alltheplaces.xyz/map.html?show=https://data.alltheplaces.xyz/runs/2021-05-26-14-42-23/output/rentacenter.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/rentacenter.py`
Content:
```
1 import json
2 import scrapy
3 import re
4 from scrapy.selector import Selector
5 
6 from locations.items import GeojsonPointItem
7 from locations.hours import OpeningHours
8 
9 
10 DAY_MAPPING = {
11     'Monday': 'Mo',
12     'Tuesday': 'Tu',
13     'Wednesday': 'We',
14     'Thursday': 'Th',
15     'Friday': 'Fr',
16     'Saturday': 'Sa',
17     'Sunday': 'Su'
18 }
19 
20 
21 class RentACenterSpider(scrapy.Spider):
22     name = "rentacenter"
23     item_attributes = { 'brand': "Rent-A-Center" }
24     allowed_domains = ["rentacenter.com"]
25 
26     start_urls = [
27         "https://locations.rentacenter.com/sitemap.xml",
28     ]
29 
30     def parse_hours(self, hours):
31         opening_hours = OpeningHours()
32 
33         for hour in hours:
34             opening_hours.add_range(day=DAY_MAPPING[hour["dayOfWeek"].replace('http://schema.org/', '')],
35                                     open_time=hour["opens"],
36                                     close_time=hour["closes"],
37                                     time_format='%H:%M:%S')
38 
39         return opening_hours.as_opening_hours()
40 
41     def parse_location(self, response):
42         data = response.xpath('//script[@type="application/ld+json"]/text()').extract_first()
43         data = json.loads(data)
44 
45         ref = data.get("branchCode")
46         if not ref:
47             return  # not a store page
48 
49         properties = {
50             'addr_full': data["address"]["streetAddress"],
51             'phone': data["telephone"],
52             'city': data["address"]["addressLocality"],
53             'state': data["address"]["addressRegion"],
54             'postcode': data["address"]["postalCode"],
55             'country': 'US',
56             'ref': ref,
57             'website': response.url,
58             'lat': float(data["geo"]["latitude"]),
59             'lon': float(data["geo"]["longitude"]),
60             'name': data["name"]
61         }
62 
63         hours = self.parse_hours(data.get("openingHoursSpecification", []))
64         if hours:
65             properties["opening_hours"] = hours
66 
67         yield GeojsonPointItem(**properties)
68 
69     def parse_state_sitemap(self, response):
70         xml = Selector(response)
71         xml.remove_namespaces()
72 
73         urls = xml.xpath('//loc/text()').extract()
74         urls = [url.strip() for url in urls]
75 
76         # individual store pages are listed at top, then a state page, then bunch of other non-store pages
77         # find the index position of the state page and then only parse urls before that
78         i = urls.index(re.search(r'^(https://locations.rentacenter.com/.+?)/.*$', urls[0]).groups()[0] + '/')
79         for url in urls[:i]:
80             yield scrapy.Request(url, callback=self.parse_location)
81 
82     def parse(self, response):
83         xml = Selector(response)
84         xml.remove_namespaces()
85 
86         urls = xml.xpath('//loc/text()').extract()
87         urls = [url.strip() for url in urls]
88 
89         for url in urls:
90             yield scrapy.Request(url, callback=self.parse_state_sitemap)
91 
92
```
--- 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/rentacenter.py b/locations/spiders/rentacenter.py
--- a/locations/spiders/rentacenter.py
+++ b/locations/spiders/rentacenter.py
@@ -48,15 +48,15 @@
 
         properties = {
             'addr_full': data["address"]["streetAddress"],
-            'phone': data["telephone"],
+            'phone': data.get("telephone"),
             'city': data["address"]["addressLocality"],
             'state': data["address"]["addressRegion"],
             'postcode': data["address"]["postalCode"],
             'country': 'US',
             'ref': ref,
             'website': response.url,
-            'lat': float(data["geo"]["latitude"]),
-            'lon': float(data["geo"]["longitude"]),
+            'lat': data["geo"]["latitude"],
+            'lon': data["geo"]["longitude"],
             'name': data["name"]
         }
 
@@ -87,5 +87,7 @@
         urls = [url.strip() for url in urls]
 
         for url in urls:
+            if '/home/' in url:
+                continue
             yield scrapy.Request(url, callback=self.parse_state_sitemap)

{"golden_diff": "diff --git a/locations/spiders/rentacenter.py b/locations/spiders/rentacenter.py\n--- a/locations/spiders/rentacenter.py\n+++ b/locations/spiders/rentacenter.py\n@@ -48,15 +48,15 @@\n \n         properties = {\n             'addr_full': data[\"address\"][\"streetAddress\"],\n-            'phone': data[\"telephone\"],\n+            'phone': data.get(\"telephone\"),\n             'city': data[\"address\"][\"addressLocality\"],\n             'state': data[\"address\"][\"addressRegion\"],\n             'postcode': data[\"address\"][\"postalCode\"],\n             'country': 'US',\n             'ref': ref,\n             'website': response.url,\n-            'lat': float(data[\"geo\"][\"latitude\"]),\n-            'lon': float(data[\"geo\"][\"longitude\"]),\n+            'lat': data[\"geo\"][\"latitude\"],\n+            'lon': data[\"geo\"][\"longitude\"],\n             'name': data[\"name\"]\n         }\n \n@@ -87,5 +87,7 @@\n         urls = [url.strip() for url in urls]\n \n         for url in urls:\n+            if '/home/' in url:\n+                continue\n             yield scrapy.Request(url, callback=self.parse_state_sitemap)\n", "issue": "Spider rentacenter is broken\nDuring the global build at 2021-05-26-14-42-23, spider **rentacenter** failed with **2196 features** and **1 errors**.\n\nHere's [the log](https://data.alltheplaces.xyz/runs/2021-05-26-14-42-23/logs/rentacenter.log) and [the output](https://data.alltheplaces.xyz/runs/2021-05-26-14-42-23/output/rentacenter.geojson) ([on a map](https://data.alltheplaces.xyz/map.html?show=https://data.alltheplaces.xyz/runs/2021-05-26-14-42-23/output/rentacenter.geojson))\n", "before_files": [{"content": "import json\nimport scrapy\nimport re\nfrom scrapy.selector import Selector\n\nfrom locations.items import GeojsonPointItem\nfrom locations.hours import OpeningHours\n\n\nDAY_MAPPING = {\n    'Monday': 'Mo',\n    'Tuesday': 'Tu',\n    'Wednesday': 'We',\n    'Thursday': 'Th',\n    'Friday': 'Fr',\n    'Saturday': 'Sa',\n    'Sunday': 'Su'\n}\n\n\nclass RentACenterSpider(scrapy.Spider):\n    name = \"rentacenter\"\n    item_attributes = { 'brand': \"Rent-A-Center\" }\n    allowed_domains = [\"rentacenter.com\"]\n\n    start_urls = [\n        \"https://locations.rentacenter.com/sitemap.xml\",\n    ]\n\n    def parse_hours(self, hours):\n        opening_hours = OpeningHours()\n\n        for hour in hours:\n            opening_hours.add_range(day=DAY_MAPPING[hour[\"dayOfWeek\"].replace('http://schema.org/', '')],\n                                    open_time=hour[\"opens\"],\n                                    close_time=hour[\"closes\"],\n                                    time_format='%H:%M:%S')\n\n        return opening_hours.as_opening_hours()\n\n    def parse_location(self, response):\n        data = response.xpath('//script[@type=\"application/ld+json\"]/text()').extract_first()\n        data = json.loads(data)\n\n        ref = data.get(\"branchCode\")\n        if not ref:\n            return  # not a store page\n\n        properties = {\n            'addr_full': data[\"address\"][\"streetAddress\"],\n            'phone': data[\"telephone\"],\n            'city': data[\"address\"][\"addressLocality\"],\n            'state': data[\"address\"][\"addressRegion\"],\n            'postcode': data[\"address\"][\"postalCode\"],\n            'country': 'US',\n            'ref': ref,\n            'website': response.url,\n            'lat': float(data[\"geo\"][\"latitude\"]),\n            'lon': float(data[\"geo\"][\"longitude\"]),\n            'name': data[\"name\"]\n        }\n\n        hours = self.parse_hours(data.get(\"openingHoursSpecification\", []))\n        if hours:\n            properties[\"opening_hours\"] = hours\n\n        yield GeojsonPointItem(**properties)\n\n    def parse_state_sitemap(self, response):\n        xml = Selector(response)\n        xml.remove_namespaces()\n\n        urls = xml.xpath('//loc/text()').extract()\n        urls = [url.strip() for url in urls]\n\n        # individual store pages are listed at top, then a state page, then bunch of other non-store pages\n        # find the index position of the state page and then only parse urls before that\n        i = urls.index(re.search(r'^(https://locations.rentacenter.com/.+?)/.*$', urls[0]).groups()[0] + '/')\n        for url in urls[:i]:\n            yield scrapy.Request(url, callback=self.parse_location)\n\n    def parse(self, response):\n        xml = Selector(response)\n        xml.remove_namespaces()\n\n        urls = xml.xpath('//loc/text()').extract()\n        urls = [url.strip() for url in urls]\n\n        for url in urls:\n            yield scrapy.Request(url, callback=self.parse_state_sitemap)\n\n", "path": "locations/spiders/rentacenter.py"}], "after_files": [{"content": "import json\nimport scrapy\nimport re\nfrom scrapy.selector import Selector\n\nfrom locations.items import GeojsonPointItem\nfrom locations.hours import OpeningHours\n\n\nDAY_MAPPING = {\n    'Monday': 'Mo',\n    'Tuesday': 'Tu',\n    'Wednesday': 'We',\n    'Thursday': 'Th',\n    'Friday': 'Fr',\n    'Saturday': 'Sa',\n    'Sunday': 'Su'\n}\n\n\nclass RentACenterSpider(scrapy.Spider):\n    name = \"rentacenter\"\n    item_attributes = { 'brand': \"Rent-A-Center\" }\n    allowed_domains = [\"rentacenter.com\"]\n\n    start_urls = [\n        \"https://locations.rentacenter.com/sitemap.xml\",\n    ]\n\n    def parse_hours(self, hours):\n        opening_hours = OpeningHours()\n\n        for hour in hours:\n            opening_hours.add_range(day=DAY_MAPPING[hour[\"dayOfWeek\"].replace('http://schema.org/', '')],\n                                    open_time=hour[\"opens\"],\n                                    close_time=hour[\"closes\"],\n                                    time_format='%H:%M:%S')\n\n        return opening_hours.as_opening_hours()\n\n    def parse_location(self, response):\n        data = response.xpath('//script[@type=\"application/ld+json\"]/text()').extract_first()\n        data = json.loads(data)\n\n        ref = data.get(\"branchCode\")\n        if not ref:\n            return  # not a store page\n\n        properties = {\n            'addr_full': data[\"address\"][\"streetAddress\"],\n            'phone': data.get(\"telephone\"),\n            'city': data[\"address\"][\"addressLocality\"],\n            'state': data[\"address\"][\"addressRegion\"],\n            'postcode': data[\"address\"][\"postalCode\"],\n            'country': 'US',\n            'ref': ref,\n            'website': response.url,\n            'lat': data[\"geo\"][\"latitude\"],\n            'lon': data[\"geo\"][\"longitude\"],\n            'name': data[\"name\"]\n        }\n\n        hours = self.parse_hours(data.get(\"openingHoursSpecification\", []))\n        if hours:\n            properties[\"opening_hours\"] = hours\n\n        yield GeojsonPointItem(**properties)\n\n    def parse_state_sitemap(self, response):\n        xml = Selector(response)\n        xml.remove_namespaces()\n\n        urls = xml.xpath('//loc/text()').extract()\n        urls = [url.strip() for url in urls]\n\n        # individual store pages are listed at top, then a state page, then bunch of other non-store pages\n        # find the index position of the state page and then only parse urls before that\n        i = urls.index(re.search(r'^(https://locations.rentacenter.com/.+?)/.*$', urls[0]).groups()[0] + '/')\n        for url in urls[:i]:\n            yield scrapy.Request(url, callback=self.parse_location)\n\n    def parse(self, response):\n        xml = Selector(response)\n        xml.remove_namespaces()\n\n        urls = xml.xpath('//loc/text()').extract()\n        urls = [url.strip() for url in urls]\n\n        for url in urls:\n            if '/home/' in url:\n                continue\n            yield scrapy.Request(url, callback=self.parse_state_sitemap)\n\n", "path": "locations/spiders/rentacenter.py"}]}