prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Spider ljsilvers is broken
  During the global build at 2021-06-02-14-42-40, spider **ljsilvers** failed with **0 features** and **0 errors**.
  
  Here's [the log](https://data.alltheplaces.xyz/runs/2021-06-02-14-42-40/logs/ljsilvers.txt) and [the output](https://data.alltheplaces.xyz/runs/2021-06-02-14-42-40/output/ljsilvers.geojson) ([on a map](https://data.alltheplaces.xyz/map.html?show=https://data.alltheplaces.xyz/runs/2021-06-02-14-42-40/output/ljsilvers.geojson))
  Long John Silver's
  http://www.ljsilvers.com/
  
  (location search box top right)
  
  </issue>
  <code>
  [start of locations/spiders/ljsilvers.py]
  1 # -*- coding: utf-8 -*-
  2 import scrapy
  3 import json
  4 import re
  5 
  6 from locations.items import GeojsonPointItem
  7 
  8 
  9 class LjsilversSpider(scrapy.Spider):
  10     name = "ljsilvers"
  11     item_attributes = { 'brand': "Long John Silver's", 'brand_wikidata': "Q1535221" }
  12     allowed_domains = ["ljsilvers.com"]
  13     start_urls = (
  14         'http://www.ljsilvers.com/locator?postalcode=76010',
  15     )
  16 
  17     def parse(self, response):
  18         data = response.body_as_unicode()
  19         base_data = re.search(r'dataout\s--Array\s\((.*)\)\s\s--><style type="text/css">', data, re.DOTALL).group(1)
  20         detail_matches = re.findall(r'\((.*?)\)', base_data, re.DOTALL)
  21 
  22         for detail_match in detail_matches:
  23             key_values = re.findall(r'(.*?)\s=>\s(.*)', detail_match)
  24             props = {}
  25 
  26             for key_value in key_values:
  27                 key = key_value[0].strip()
  28                 value = key_value[1].strip()
  29 
  30                 if key == '[storeID]':
  31                     props['ref'] = value
  32                 if key == '[address]':
  33                     props['addr_full'] = value
  34                 if key == '[city]':
  35                     props['city'] = value
  36                 if key == '[state]':
  37                     props['state'] = value
  38                 if key == '[zip]':
  39                     props['postcode'] = value
  40                 if key == '[phone_number]':
  41                     props['phone'] = value
  42                 if key == '[latitude]':
  43                     props['lat'] = value
  44                 if key == '[longitude]':
  45                     props['lon'] = value
  46 
  47             yield GeojsonPointItem(**props)
  48
  [end of locations/spiders/ljsilvers.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/ljsilvers.py b/locations/spiders/ljsilvers.py
  --- a/locations/spiders/ljsilvers.py
  +++ b/locations/spiders/ljsilvers.py
  @@ -1,47 +1,32 @@
   # -*- coding: utf-8 -*-
   import scrapy
  -import json
  -import re
   
   from locations.items import GeojsonPointItem
   
   
   class LjsilversSpider(scrapy.Spider):
       name = "ljsilvers"
  -    item_attributes = { 'brand': "Long John Silver's", 'brand_wikidata': "Q1535221" }
  +    item_attributes = {"brand": "Long John Silver's", "brand_wikidata": "Q1535221"}
       allowed_domains = ["ljsilvers.com"]
       start_urls = (
  -        'http://www.ljsilvers.com/locator?postalcode=76010',
  +        "https://viewer.blipstar.com/searchdbnew?uid=2483677&lat=45&lng=-103&value=10000",
       )
   
       def parse(self, response):
  -        data = response.body_as_unicode()
  -        base_data = re.search(r'dataout\s--Array\s\((.*)\)\s\s--><style type="text/css">', data, re.DOTALL).group(1)
  -        detail_matches = re.findall(r'\((.*?)\)', base_data, re.DOTALL)
  -
  -        for detail_match in detail_matches:
  -            key_values = re.findall(r'(.*?)\s=>\s(.*)', detail_match)
  -            props = {}
  -
  -            for key_value in key_values:
  -                key = key_value[0].strip()
  -                value = key_value[1].strip()
  -
  -                if key == '[storeID]':
  -                    props['ref'] = value
  -                if key == '[address]':
  -                    props['addr_full'] = value
  -                if key == '[city]':
  -                    props['city'] = value
  -                if key == '[state]':
  -                    props['state'] = value
  -                if key == '[zip]':
  -                    props['postcode'] = value
  -                if key == '[phone_number]':
  -                    props['phone'] = value
  -                if key == '[latitude]':
  -                    props['lat'] = value
  -                if key == '[longitude]':
  -                    props['lon'] = value
  -
  -            yield GeojsonPointItem(**props)
  +        for row in response.json():
  +            if row.keys() == {"fulltotal", "total", "units"}:
  +                continue
  +            addr = scrapy.Selector(text=row["a"])
  +            properties = {
  +                "name": row["n"],
  +                "ref": row["bpid"],
  +                "lat": row["lat"],
  +                "lon": row["lng"],
  +                "addr_full": addr.xpath("//p/text()").extract_first(),
  +                "city": addr.css(".storecity ::text").extract_first(),
  +                "state": addr.css(".storestate ::text").extract_first(),
  +                "postcode": addr.css(".storepostalcode ::text").extract_first(),
  +                "country": row["c"],
  +                "phone": row.get("p"),
  +            }
  +            yield GeojsonPointItem(**properties)
  
verification_info: {"golden_diff": "diff --git a/locations/spiders/ljsilvers.py b/locations/spiders/ljsilvers.py\n--- a/locations/spiders/ljsilvers.py\n+++ b/locations/spiders/ljsilvers.py\n@@ -1,47 +1,32 @@\n # -*- coding: utf-8 -*-\n import scrapy\n-import json\n-import re\n \n from locations.items import GeojsonPointItem\n \n \n class LjsilversSpider(scrapy.Spider):\n     name = \"ljsilvers\"\n-    item_attributes = { 'brand': \"Long John Silver's\", 'brand_wikidata': \"Q1535221\" }\n+    item_attributes = {\"brand\": \"Long John Silver's\", \"brand_wikidata\": \"Q1535221\"}\n     allowed_domains = [\"ljsilvers.com\"]\n     start_urls = (\n-        'http://www.ljsilvers.com/locator?postalcode=76010',\n+        \"https://viewer.blipstar.com/searchdbnew?uid=2483677&lat=45&lng=-103&value=10000\",\n     )\n \n     def parse(self, response):\n-        data = response.body_as_unicode()\n-        base_data = re.search(r'dataout\\s--Array\\s\\((.*)\\)\\s\\s--><style type=\"text/css\">', data, re.DOTALL).group(1)\n-        detail_matches = re.findall(r'\\((.*?)\\)', base_data, re.DOTALL)\n-\n-        for detail_match in detail_matches:\n-            key_values = re.findall(r'(.*?)\\s=>\\s(.*)', detail_match)\n-            props = {}\n-\n-            for key_value in key_values:\n-                key = key_value[0].strip()\n-                value = key_value[1].strip()\n-\n-                if key == '[storeID]':\n-                    props['ref'] = value\n-                if key == '[address]':\n-                    props['addr_full'] = value\n-                if key == '[city]':\n-                    props['city'] = value\n-                if key == '[state]':\n-                    props['state'] = value\n-                if key == '[zip]':\n-                    props['postcode'] = value\n-                if key == '[phone_number]':\n-                    props['phone'] = value\n-                if key == '[latitude]':\n-                    props['lat'] = value\n-                if key == '[longitude]':\n-                    props['lon'] = value\n-\n-            yield GeojsonPointItem(**props)\n+        for row in response.json():\n+            if row.keys() == {\"fulltotal\", \"total\", \"units\"}:\n+                continue\n+            addr = scrapy.Selector(text=row[\"a\"])\n+            properties = {\n+                \"name\": row[\"n\"],\n+                \"ref\": row[\"bpid\"],\n+                \"lat\": row[\"lat\"],\n+                \"lon\": row[\"lng\"],\n+                \"addr_full\": addr.xpath(\"//p/text()\").extract_first(),\n+                \"city\": addr.css(\".storecity ::text\").extract_first(),\n+                \"state\": addr.css(\".storestate ::text\").extract_first(),\n+                \"postcode\": addr.css(\".storepostalcode ::text\").extract_first(),\n+                \"country\": row[\"c\"],\n+                \"phone\": row.get(\"p\"),\n+            }\n+            yield GeojsonPointItem(**properties)\n", "issue": "Spider ljsilvers is broken\nDuring the global build at 2021-06-02-14-42-40, spider **ljsilvers** failed with **0 features** and **0 errors**.\n\nHere's [the log](https://data.alltheplaces.xyz/runs/2021-06-02-14-42-40/logs/ljsilvers.txt) and [the output](https://data.alltheplaces.xyz/runs/2021-06-02-14-42-40/output/ljsilvers.geojson) ([on a map](https://data.alltheplaces.xyz/map.html?show=https://data.alltheplaces.xyz/runs/2021-06-02-14-42-40/output/ljsilvers.geojson))\nLong John Silver's\nhttp://www.ljsilvers.com/\r\n\r\n(location search box top right)\n", "before_files": [{"content": "# -*- coding: utf-8 -*-\nimport scrapy\nimport json\nimport re\n\nfrom locations.items import GeojsonPointItem\n\n\nclass LjsilversSpider(scrapy.Spider):\n    name = \"ljsilvers\"\n    item_attributes = { 'brand': \"Long John Silver's\", 'brand_wikidata': \"Q1535221\" }\n    allowed_domains = [\"ljsilvers.com\"]\n    start_urls = (\n        'http://www.ljsilvers.com/locator?postalcode=76010',\n    )\n\n    def parse(self, response):\n        data = response.body_as_unicode()\n        base_data = re.search(r'dataout\\s--Array\\s\\((.*)\\)\\s\\s--><style type=\"text/css\">', data, re.DOTALL).group(1)\n        detail_matches = re.findall(r'\\((.*?)\\)', base_data, re.DOTALL)\n\n        for detail_match in detail_matches:\n            key_values = re.findall(r'(.*?)\\s=>\\s(.*)', detail_match)\n            props = {}\n\n            for key_value in key_values:\n                key = key_value[0].strip()\n                value = key_value[1].strip()\n\n                if key == '[storeID]':\n                    props['ref'] = value\n                if key == '[address]':\n                    props['addr_full'] = value\n                if key == '[city]':\n                    props['city'] = value\n                if key == '[state]':\n                    props['state'] = value\n                if key == '[zip]':\n                    props['postcode'] = value\n                if key == '[phone_number]':\n                    props['phone'] = value\n                if key == '[latitude]':\n                    props['lat'] = value\n                if key == '[longitude]':\n                    props['lon'] = value\n\n            yield GeojsonPointItem(**props)\n", "path": "locations/spiders/ljsilvers.py"}]}