prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Spider kum_and_go is broken
  During the global build at 2021-08-25-14-42-15, spider **kum_and_go** failed with **0 features** and **0 errors**.
  
  Here's [the log](https://data.alltheplaces.xyz/runs/2021-08-25-14-42-15/logs/kum_and_go.txt) and [the output](https://data.alltheplaces.xyz/runs/2021-08-25-14-42-15/output/kum_and_go.geojson) ([on a map](https://data.alltheplaces.xyz/map.html?show=https://data.alltheplaces.xyz/runs/2021-08-25-14-42-15/output/kum_and_go.geojson))
  
  </issue>
  <code>
  [start of locations/spiders/kum_and_go.py]
  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 KumAndGoSpider(scrapy.Spider):
  10     name = "kum_and_go"
  11     item_attributes = {'brand': "Kum & Go", 'brand_wikidata': "Q6443340"}
  12     allowed_domains = ["kumandgo.com"]
  13 
  14     def start_requests(self):
  15         yield scrapy.FormRequest(
  16             'https://www.kumandgo.com/wordpress/wp-admin/admin-ajax.php',
  17             method='POST',
  18             formdata={
  19                 'coords[latitude]': '39.74581290359507',
  20                 'coords[longitude]': '-104.96756559990148',
  21                 'radius': '3000',
  22                 'action': 'stores_coords'
  23             })
  24 
  25     def parse(self, response):
  26         result = json.loads(response.body_as_unicode())
  27         for store in result['data']['stores']:
  28             opening_hours = OpeningHours()
  29 
  30             for hours_key in [
  31                 'monday_hours',
  32                 'tuesday_hours',
  33                 'wednesday_hours',
  34                 'thursday_hours',
  35                 'friday_hours',
  36                 'saturday_hours',
  37                 'sunday_hours'
  38             ]:
  39                 (open_time, close_time) = store[hours_key].split(' - ')
  40 
  41                 opening_hours.add_range(day=hours_key[:2].capitalize(),
  42                                         open_time=open_time,
  43                                         close_time=close_time,
  44                                         time_format='%I:%M %p')
  45 
  46             yield GeojsonPointItem(
  47                 ref=store['store_id'],
  48                 lon=store['longitude'],
  49                 lat=store['latitude'],
  50                 name=store['name'],
  51                 addr_full=store['address1'],
  52                 city=store['city'],
  53                 state=store['state'],
  54                 postcode=store['postalcode'],
  55                 country=store['country'],
  56                 phone=store['phone'],
  57                 website=store['url'],
  58                 opening_hours=opening_hours.as_opening_hours(),
  59                 extras={
  60                     'amenity:fuel': True,
  61                     'atm': int(store['atm'] or 0) == 1,
  62                     'car_wash': int(store['car_wash'] or 0) == 1,
  63                     'fuel:diesel': int(store['diesel'] or 0) == 1,
  64                     'fuel:e85': int(store['e85'] or 0) == 1,
  65                     'hgv': int(store['semi_truck_fuel_island'] or 0) == 1,
  66                 }
  67             )
  68
  [end of locations/spiders/kum_and_go.py]
  </code>
  
  I need you to solve this issue by generating a single patch file that I can apply directly to this repository using git apply. Please respond with a single patch file in the following format.
  <patch>
  diff --git a/file.py b/file.py
  --- a/file.py
  +++ b/file.py
  @@ -1,27 +1,35 @@
   def euclidean(a, b):
  -    while b:
  -        a, b = b, a % b
  -    return a
  +    if b == 0:
  +        return a
  +    return euclidean(b, a % b)
   
   
   def bresenham(x0, y0, x1, y1):
       points = []
       dx = abs(x1 - x0)
       dy = abs(y1 - y0)
  -    sx = 1 if x0 < x1 else -1
  -    sy = 1 if y0 < y1 else -1
  -    err = dx - dy
  +    x, y = x0, y0
  +    sx = -1 if x0 > x1 else 1
  +    sy = -1 if y0 > y1 else 1
   
  -    while True:
  -        points.append((x0, y0))
  -        if x0 == x1 and y0 == y1:
  -            break
  -        e2 = 2 * err
  -        if e2 > -dy:
  -            err -= dy
  -            x0 += sx
  -        if e2 < dx:
  -            err += dx
  -            y0 += sy
  +    if dx > dy:
  +        err = dx / 2.0
  +        while x != x1:
  +            points.append((x, y))
  +            err -= dy
  +            if err < 0:
  +                y += sy
  +                err += dx
  +            x += sx
  +    else:
  +        err = dy / 2.0
  +        while y != y1:
  +            points.append((x, y))
  +            err -= dx
  +            if err < 0:
  +                x += sx
  +                err += dy
  +            y += sy
  +
  +    points.append((x, y))
       return points
  
  </patch>
golden_diff: diff --git a/locations/spiders/kum_and_go.py b/locations/spiders/kum_and_go.py
  --- a/locations/spiders/kum_and_go.py
  +++ b/locations/spiders/kum_and_go.py
  @@ -1,4 +1,5 @@
   # -*- coding: utf-8 -*-
  +import csv
   import scrapy
   import json
   
  @@ -12,56 +13,27 @@
       allowed_domains = ["kumandgo.com"]
   
       def start_requests(self):
  -        yield scrapy.FormRequest(
  -            'https://www.kumandgo.com/wordpress/wp-admin/admin-ajax.php',
  -            method='POST',
  -            formdata={
  -                'coords[latitude]': '39.74581290359507',
  -                'coords[longitude]': '-104.96756559990148',
  -                'radius': '3000',
  -                'action': 'stores_coords'
  -            })
  +        with open('./locations/searchable_points/us_centroids_100mile_radius_state.csv') as points:
  +            reader = csv.DictReader(points)
  +            for point in reader:
  +                if point['state'] in ('IA', 'AR', 'CO', 'MN', 'MO', 'MT', 'NE', 'ND', 'OK', 'SD', 'WY'):
  +                    yield scrapy.Request(
  +                        f'https://www.kumandgo.com/wordpress/wp-admin/admin-ajax.php?action=store_search&lat={point["latitude"]}&lng={point["longitude"]}&max_results=100&search_radius=100',
  +                    )
   
       def parse(self, response):
  -        result = json.loads(response.body_as_unicode())
  -        for store in result['data']['stores']:
  -            opening_hours = OpeningHours()
  -
  -            for hours_key in [
  -                'monday_hours',
  -                'tuesday_hours',
  -                'wednesday_hours',
  -                'thursday_hours',
  -                'friday_hours',
  -                'saturday_hours',
  -                'sunday_hours'
  -            ]:
  -                (open_time, close_time) = store[hours_key].split(' - ')
  -
  -                opening_hours.add_range(day=hours_key[:2].capitalize(),
  -                                        open_time=open_time,
  -                                        close_time=close_time,
  -                                        time_format='%I:%M %p')
  +        result = json.loads(response.text)
  +        for store in result:
   
               yield GeojsonPointItem(
  -                ref=store['store_id'],
  -                lon=store['longitude'],
  -                lat=store['latitude'],
  -                name=store['name'],
  -                addr_full=store['address1'],
  +                ref=store['id'],
  +                lon=store['lng'],
  +                lat=store['lat'],
  +                addr_full=store['address'],
                   city=store['city'],
                   state=store['state'],
  -                postcode=store['postalcode'],
  +                postcode=store['zip'],
                   country=store['country'],
                   phone=store['phone'],
  -                website=store['url'],
  -                opening_hours=opening_hours.as_opening_hours(),
  -                extras={
  -                    'amenity:fuel': True,
  -                    'atm': int(store['atm'] or 0) == 1,
  -                    'car_wash': int(store['car_wash'] or 0) == 1,
  -                    'fuel:diesel': int(store['diesel'] or 0) == 1,
  -                    'fuel:e85': int(store['e85'] or 0) == 1,
  -                    'hgv': int(store['semi_truck_fuel_island'] or 0) == 1,
  -                }
  +                website=store['permalink'],
               )
  
verification_info: {"golden_diff": "diff --git a/locations/spiders/kum_and_go.py b/locations/spiders/kum_and_go.py\n--- a/locations/spiders/kum_and_go.py\n+++ b/locations/spiders/kum_and_go.py\n@@ -1,4 +1,5 @@\n # -*- coding: utf-8 -*-\n+import csv\n import scrapy\n import json\n \n@@ -12,56 +13,27 @@\n     allowed_domains = [\"kumandgo.com\"]\n \n     def start_requests(self):\n-        yield scrapy.FormRequest(\n-            'https://www.kumandgo.com/wordpress/wp-admin/admin-ajax.php',\n-            method='POST',\n-            formdata={\n-                'coords[latitude]': '39.74581290359507',\n-                'coords[longitude]': '-104.96756559990148',\n-                'radius': '3000',\n-                'action': 'stores_coords'\n-            })\n+        with open('./locations/searchable_points/us_centroids_100mile_radius_state.csv') as points:\n+            reader = csv.DictReader(points)\n+            for point in reader:\n+                if point['state'] in ('IA', 'AR', 'CO', 'MN', 'MO', 'MT', 'NE', 'ND', 'OK', 'SD', 'WY'):\n+                    yield scrapy.Request(\n+                        f'https://www.kumandgo.com/wordpress/wp-admin/admin-ajax.php?action=store_search&lat={point[\"latitude\"]}&lng={point[\"longitude\"]}&max_results=100&search_radius=100',\n+                    )\n \n     def parse(self, response):\n-        result = json.loads(response.body_as_unicode())\n-        for store in result['data']['stores']:\n-            opening_hours = OpeningHours()\n-\n-            for hours_key in [\n-                'monday_hours',\n-                'tuesday_hours',\n-                'wednesday_hours',\n-                'thursday_hours',\n-                'friday_hours',\n-                'saturday_hours',\n-                'sunday_hours'\n-            ]:\n-                (open_time, close_time) = store[hours_key].split(' - ')\n-\n-                opening_hours.add_range(day=hours_key[:2].capitalize(),\n-                                        open_time=open_time,\n-                                        close_time=close_time,\n-                                        time_format='%I:%M %p')\n+        result = json.loads(response.text)\n+        for store in result:\n \n             yield GeojsonPointItem(\n-                ref=store['store_id'],\n-                lon=store['longitude'],\n-                lat=store['latitude'],\n-                name=store['name'],\n-                addr_full=store['address1'],\n+                ref=store['id'],\n+                lon=store['lng'],\n+                lat=store['lat'],\n+                addr_full=store['address'],\n                 city=store['city'],\n                 state=store['state'],\n-                postcode=store['postalcode'],\n+                postcode=store['zip'],\n                 country=store['country'],\n                 phone=store['phone'],\n-                website=store['url'],\n-                opening_hours=opening_hours.as_opening_hours(),\n-                extras={\n-                    'amenity:fuel': True,\n-                    'atm': int(store['atm'] or 0) == 1,\n-                    'car_wash': int(store['car_wash'] or 0) == 1,\n-                    'fuel:diesel': int(store['diesel'] or 0) == 1,\n-                    'fuel:e85': int(store['e85'] or 0) == 1,\n-                    'hgv': int(store['semi_truck_fuel_island'] or 0) == 1,\n-                }\n+                website=store['permalink'],\n             )\n", "issue": "Spider kum_and_go is broken\nDuring the global build at 2021-08-25-14-42-15, spider **kum_and_go** failed with **0 features** and **0 errors**.\n\nHere's [the log](https://data.alltheplaces.xyz/runs/2021-08-25-14-42-15/logs/kum_and_go.txt) and [the output](https://data.alltheplaces.xyz/runs/2021-08-25-14-42-15/output/kum_and_go.geojson) ([on a map](https://data.alltheplaces.xyz/map.html?show=https://data.alltheplaces.xyz/runs/2021-08-25-14-42-15/output/kum_and_go.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 KumAndGoSpider(scrapy.Spider):\n    name = \"kum_and_go\"\n    item_attributes = {'brand': \"Kum & Go\", 'brand_wikidata': \"Q6443340\"}\n    allowed_domains = [\"kumandgo.com\"]\n\n    def start_requests(self):\n        yield scrapy.FormRequest(\n            'https://www.kumandgo.com/wordpress/wp-admin/admin-ajax.php',\n            method='POST',\n            formdata={\n                'coords[latitude]': '39.74581290359507',\n                'coords[longitude]': '-104.96756559990148',\n                'radius': '3000',\n                'action': 'stores_coords'\n            })\n\n    def parse(self, response):\n        result = json.loads(response.body_as_unicode())\n        for store in result['data']['stores']:\n            opening_hours = OpeningHours()\n\n            for hours_key in [\n                'monday_hours',\n                'tuesday_hours',\n                'wednesday_hours',\n                'thursday_hours',\n                'friday_hours',\n                'saturday_hours',\n                'sunday_hours'\n            ]:\n                (open_time, close_time) = store[hours_key].split(' - ')\n\n                opening_hours.add_range(day=hours_key[:2].capitalize(),\n                                        open_time=open_time,\n                                        close_time=close_time,\n                                        time_format='%I:%M %p')\n\n            yield GeojsonPointItem(\n                ref=store['store_id'],\n                lon=store['longitude'],\n                lat=store['latitude'],\n                name=store['name'],\n                addr_full=store['address1'],\n                city=store['city'],\n                state=store['state'],\n                postcode=store['postalcode'],\n                country=store['country'],\n                phone=store['phone'],\n                website=store['url'],\n                opening_hours=opening_hours.as_opening_hours(),\n                extras={\n                    'amenity:fuel': True,\n                    'atm': int(store['atm'] or 0) == 1,\n                    'car_wash': int(store['car_wash'] or 0) == 1,\n                    'fuel:diesel': int(store['diesel'] or 0) == 1,\n                    'fuel:e85': int(store['e85'] or 0) == 1,\n                    'hgv': int(store['semi_truck_fuel_island'] or 0) == 1,\n                }\n            )\n", "path": "locations/spiders/kum_and_go.py"}]}