We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Spider sunoco is broken
During the global build at 2021-07-21-14-42-39, spider **sunoco** failed with **0 features** and **1 errors**.

Here's [the log](https://data.alltheplaces.xyz/runs/2021-07-21-14-42-39/logs/sunoco.txt) and [the output](https://data.alltheplaces.xyz/runs/2021-07-21-14-42-39/output/sunoco.geojson) ([on a map](https://data.alltheplaces.xyz/map.html?show=https://data.alltheplaces.xyz/runs/2021-07-21-14-42-39/output/sunoco.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/sunoco.py`
Content:
```
1 # -*- coding: utf-8 -*-
2 import scrapy
3 import json
4 
5 from locations.items import GeojsonPointItem
6 from locations.hours import OpeningHours
7 
8 
9 class SunocoSpider(scrapy.Spider):
10     name = "sunoco"
11     item_attributes = {'brand': "Sunoco", 'brand_wikidata': "Q1423218"}
12     allowed_domains = ["sunoco.com"]
13 
14     start_urls = ['https://www.sunoco.com/js/locations.json']
15 
16     def parse(self, response):
17         for location in json.loads(response.body_as_unicode()):
18             opening_hours = OpeningHours()
19 
20             for key in [
21                 'Hrs of Operation Mon-Sat Open',
22                 'Hrs of Operation Mon-Sat Close',
23                 'Hrs of Operation Sun Open',
24                 'Hrs of Operation Sun Close'
25             ]:
26                 if location[key] >= 2400:
27                     location[key] -= 2400
28 
29             for day in ['Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa']:
30                 opening_hours.add_range(day=day,
31                                         open_time=f"{location['Hrs of Operation Mon-Sat Open']:04d}",
32                                         close_time=f"{location['Hrs of Operation Mon-Sat Close']:04d}",
33                                         time_format='%H%M')
34 
35             opening_hours.add_range(day='Su',
36                                     open_time=f"{location['Hrs of Operation Sun Open']:04d}",
37                                     close_time=f"{location['Hrs of Operation Sun Close']:04d}",
38                                     time_format='%H%M')
39 
40             yield GeojsonPointItem(
41                 ref=location['Facility ID'],
42                 lon=location['Longitude'],
43                 lat=location['Latitude'],
44                 # name as shown on the Sunoco site
45                 name=f"Sunoco #{location['Facility ID']}",
46                 addr_full=location['Address'],
47                 city=location['City'],
48                 state=location['State'],
49                 postcode=location['Zip'],
50                 country='US',
51                 phone=location['Phone'],
52                 opening_hours=opening_hours.as_opening_hours(),
53                 extras={
54                     'amenity:fuel': True,
55                     'atm': int(location['ATM'] or 0) == 1,
56                     'car_wash': int(location['Car Wash'] or 0) == 1,
57                     'fuel:diesel': int(location['Diesel'] or 0) == 1,
58                     'fuel:kerosene': int(location['Kerosene'] or 0) == 1
59                 }
60             )
61
```
--- 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/sunoco.py b/locations/spiders/sunoco.py
--- a/locations/spiders/sunoco.py
+++ b/locations/spiders/sunoco.py
@@ -17,44 +17,34 @@
         for location in json.loads(response.body_as_unicode()):
             opening_hours = OpeningHours()
 
-            for key in [
-                'Hrs of Operation Mon-Sat Open',
-                'Hrs of Operation Mon-Sat Close',
-                'Hrs of Operation Sun Open',
-                'Hrs of Operation Sun Close'
-            ]:
-                if location[key] >= 2400:
-                    location[key] -= 2400
-
-            for day in ['Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa']:
-                opening_hours.add_range(day=day,
-                                        open_time=f"{location['Hrs of Operation Mon-Sat Open']:04d}",
-                                        close_time=f"{location['Hrs of Operation Mon-Sat Close']:04d}",
-                                        time_format='%H%M')
-
-            opening_hours.add_range(day='Su',
-                                    open_time=f"{location['Hrs of Operation Sun Open']:04d}",
-                                    close_time=f"{location['Hrs of Operation Sun Close']:04d}",
-                                    time_format='%H%M')
+            for key, val in location.items():
+                if not key.endswith('_Hours'):
+                    continue
+                day = key[:2].capitalize()
+                if val == '24 hours':
+                    open_time = close_time = '12 AM'
+                else:
+                    open_time, close_time = val.split(' to ')
+                opening_hours.add_range(day, open_time, close_time, '%I %p')
 
             yield GeojsonPointItem(
-                ref=location['Facility ID'],
+                ref=location['Store_ID'],
                 lon=location['Longitude'],
                 lat=location['Latitude'],
                 # name as shown on the Sunoco site
-                name=f"Sunoco #{location['Facility ID']}",
-                addr_full=location['Address'],
+                name=f"Sunoco #{location['Store_ID']}",
+                addr_full=location['Street_Address'],
                 city=location['City'],
                 state=location['State'],
-                postcode=location['Zip'],
+                postcode=location['Postalcode'],
                 country='US',
                 phone=location['Phone'],
                 opening_hours=opening_hours.as_opening_hours(),
                 extras={
                     'amenity:fuel': True,
-                    'atm': int(location['ATM'] or 0) == 1,
-                    'car_wash': int(location['Car Wash'] or 0) == 1,
-                    'fuel:diesel': int(location['Diesel'] or 0) == 1,
-                    'fuel:kerosene': int(location['Kerosene'] or 0) == 1
+                    'atm': location['ATM'] == 'Y',
+                    'car_wash': location['CarWash'],
+                    'fuel:diesel': location['HasDiesel'] == 'Y',
+                    'fuel:kerosene': location['HasKero'] == 'Y'
                 }
             )

{"golden_diff": "diff --git a/locations/spiders/sunoco.py b/locations/spiders/sunoco.py\n--- a/locations/spiders/sunoco.py\n+++ b/locations/spiders/sunoco.py\n@@ -17,44 +17,34 @@\n         for location in json.loads(response.body_as_unicode()):\n             opening_hours = OpeningHours()\n \n-            for key in [\n-                'Hrs of Operation Mon-Sat Open',\n-                'Hrs of Operation Mon-Sat Close',\n-                'Hrs of Operation Sun Open',\n-                'Hrs of Operation Sun Close'\n-            ]:\n-                if location[key] >= 2400:\n-                    location[key] -= 2400\n-\n-            for day in ['Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa']:\n-                opening_hours.add_range(day=day,\n-                                        open_time=f\"{location['Hrs of Operation Mon-Sat Open']:04d}\",\n-                                        close_time=f\"{location['Hrs of Operation Mon-Sat Close']:04d}\",\n-                                        time_format='%H%M')\n-\n-            opening_hours.add_range(day='Su',\n-                                    open_time=f\"{location['Hrs of Operation Sun Open']:04d}\",\n-                                    close_time=f\"{location['Hrs of Operation Sun Close']:04d}\",\n-                                    time_format='%H%M')\n+            for key, val in location.items():\n+                if not key.endswith('_Hours'):\n+                    continue\n+                day = key[:2].capitalize()\n+                if val == '24 hours':\n+                    open_time = close_time = '12 AM'\n+                else:\n+                    open_time, close_time = val.split(' to ')\n+                opening_hours.add_range(day, open_time, close_time, '%I %p')\n \n             yield GeojsonPointItem(\n-                ref=location['Facility ID'],\n+                ref=location['Store_ID'],\n                 lon=location['Longitude'],\n                 lat=location['Latitude'],\n                 # name as shown on the Sunoco site\n-                name=f\"Sunoco #{location['Facility ID']}\",\n-                addr_full=location['Address'],\n+                name=f\"Sunoco #{location['Store_ID']}\",\n+                addr_full=location['Street_Address'],\n                 city=location['City'],\n                 state=location['State'],\n-                postcode=location['Zip'],\n+                postcode=location['Postalcode'],\n                 country='US',\n                 phone=location['Phone'],\n                 opening_hours=opening_hours.as_opening_hours(),\n                 extras={\n                     'amenity:fuel': True,\n-                    'atm': int(location['ATM'] or 0) == 1,\n-                    'car_wash': int(location['Car Wash'] or 0) == 1,\n-                    'fuel:diesel': int(location['Diesel'] or 0) == 1,\n-                    'fuel:kerosene': int(location['Kerosene'] or 0) == 1\n+                    'atm': location['ATM'] == 'Y',\n+                    'car_wash': location['CarWash'],\n+                    'fuel:diesel': location['HasDiesel'] == 'Y',\n+                    'fuel:kerosene': location['HasKero'] == 'Y'\n                 }\n             )\n", "issue": "Spider sunoco is broken\nDuring the global build at 2021-07-21-14-42-39, spider **sunoco** failed with **0 features** and **1 errors**.\n\nHere's [the log](https://data.alltheplaces.xyz/runs/2021-07-21-14-42-39/logs/sunoco.txt) and [the output](https://data.alltheplaces.xyz/runs/2021-07-21-14-42-39/output/sunoco.geojson) ([on a map](https://data.alltheplaces.xyz/map.html?show=https://data.alltheplaces.xyz/runs/2021-07-21-14-42-39/output/sunoco.geojson))\n", "before_files": [{"content": "# -*- coding: utf-8 -*-\nimport scrapy\nimport json\n\nfrom locations.items import GeojsonPointItem\nfrom locations.hours import OpeningHours\n\n\nclass SunocoSpider(scrapy.Spider):\n    name = \"sunoco\"\n    item_attributes = {'brand': \"Sunoco\", 'brand_wikidata': \"Q1423218\"}\n    allowed_domains = [\"sunoco.com\"]\n\n    start_urls = ['https://www.sunoco.com/js/locations.json']\n\n    def parse(self, response):\n        for location in json.loads(response.body_as_unicode()):\n            opening_hours = OpeningHours()\n\n            for key in [\n                'Hrs of Operation Mon-Sat Open',\n                'Hrs of Operation Mon-Sat Close',\n                'Hrs of Operation Sun Open',\n                'Hrs of Operation Sun Close'\n            ]:\n                if location[key] >= 2400:\n                    location[key] -= 2400\n\n            for day in ['Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa']:\n                opening_hours.add_range(day=day,\n                                        open_time=f\"{location['Hrs of Operation Mon-Sat Open']:04d}\",\n                                        close_time=f\"{location['Hrs of Operation Mon-Sat Close']:04d}\",\n                                        time_format='%H%M')\n\n            opening_hours.add_range(day='Su',\n                                    open_time=f\"{location['Hrs of Operation Sun Open']:04d}\",\n                                    close_time=f\"{location['Hrs of Operation Sun Close']:04d}\",\n                                    time_format='%H%M')\n\n            yield GeojsonPointItem(\n                ref=location['Facility ID'],\n                lon=location['Longitude'],\n                lat=location['Latitude'],\n                # name as shown on the Sunoco site\n                name=f\"Sunoco #{location['Facility ID']}\",\n                addr_full=location['Address'],\n                city=location['City'],\n                state=location['State'],\n                postcode=location['Zip'],\n                country='US',\n                phone=location['Phone'],\n                opening_hours=opening_hours.as_opening_hours(),\n                extras={\n                    'amenity:fuel': True,\n                    'atm': int(location['ATM'] or 0) == 1,\n                    'car_wash': int(location['Car Wash'] or 0) == 1,\n                    'fuel:diesel': int(location['Diesel'] or 0) == 1,\n                    'fuel:kerosene': int(location['Kerosene'] or 0) == 1\n                }\n            )\n", "path": "locations/spiders/sunoco.py"}], "after_files": [{"content": "# -*- coding: utf-8 -*-\nimport scrapy\nimport json\n\nfrom locations.items import GeojsonPointItem\nfrom locations.hours import OpeningHours\n\n\nclass SunocoSpider(scrapy.Spider):\n    name = \"sunoco\"\n    item_attributes = {'brand': \"Sunoco\", 'brand_wikidata': \"Q1423218\"}\n    allowed_domains = [\"sunoco.com\"]\n\n    start_urls = ['https://www.sunoco.com/js/locations.json']\n\n    def parse(self, response):\n        for location in json.loads(response.body_as_unicode()):\n            opening_hours = OpeningHours()\n\n            for key, val in location.items():\n                if not key.endswith('_Hours'):\n                    continue\n                day = key[:2].capitalize()\n                if val == '24 hours':\n                    open_time = close_time = '12 AM'\n                else:\n                    open_time, close_time = val.split(' to ')\n                opening_hours.add_range(day, open_time, close_time, '%I %p')\n\n            yield GeojsonPointItem(\n                ref=location['Store_ID'],\n                lon=location['Longitude'],\n                lat=location['Latitude'],\n                # name as shown on the Sunoco site\n                name=f\"Sunoco #{location['Store_ID']}\",\n                addr_full=location['Street_Address'],\n                city=location['City'],\n                state=location['State'],\n                postcode=location['Postalcode'],\n                country='US',\n                phone=location['Phone'],\n                opening_hours=opening_hours.as_opening_hours(),\n                extras={\n                    'amenity:fuel': True,\n                    'atm': location['ATM'] == 'Y',\n                    'car_wash': location['CarWash'],\n                    'fuel:diesel': location['HasDiesel'] == 'Y',\n                    'fuel:kerosene': location['HasKero'] == 'Y'\n                }\n            )\n", "path": "locations/spiders/sunoco.py"}]}