prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  anytime_fitness.py null values
  The scraper currently includes address2 whether it is null or not, resulting in ", None" being appended to many (most?) of the addr:full fields.
  
  </issue>
  <code>
  [start of locations/spiders/anytime_fitness.py]
  1 # -*- coding: utf-8 -*-
  2 import scrapy
  3 from locations.items import GeojsonPointItem
  4 import json
  5 
  6 class AnytimeFitnessSpider(scrapy.Spider):
  7     name = 'anytime_fitness'
  8     allowed_domains = ['www.anytimefitness.com']
  9 
  10     def start_requests(self):
  11         url = 'https://www.anytimefitness.com/wp-content/uploads/gyms.json'
  12         yield scrapy.Request(url, callback=self.parse)
  13 
  14     def parse(self, response):
  15         gyms = json.loads(response.body_as_unicode())
  16 
  17         for gym in gyms:
  18             yield GeojsonPointItem(
  19                 lat = gym['latitude'],
  20                 lon = gym['longitude'],
  21                 addr_full = '{}, {}'.format(gym['content']['address'], gym['content']['address2']),
  22                 city = gym['content']['city'],
  23                 phone = gym['content']['phone'],
  24                 state = gym['content']['state_abbr'],
  25                 postcode = gym['content']['zip'],
  26                 ref = gym['content']['url'],
  27                 country = gym['content']['country']
  28                 )
  29                 
  30                 
  31     
  32
  [end of locations/spiders/anytime_fitness.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/anytime_fitness.py b/locations/spiders/anytime_fitness.py
  --- a/locations/spiders/anytime_fitness.py
  +++ b/locations/spiders/anytime_fitness.py
  @@ -2,6 +2,8 @@
   import scrapy
   from locations.items import GeojsonPointItem
   import json
  +import html
  +
   
   class AnytimeFitnessSpider(scrapy.Spider):
       name = 'anytime_fitness'
  @@ -18,14 +20,13 @@
               yield GeojsonPointItem(
                   lat = gym['latitude'],
                   lon = gym['longitude'],
  -                addr_full = '{}, {}'.format(gym['content']['address'], gym['content']['address2']),
  +                addr_full = ", ".join(filter(None, [gym['content']['address'], gym['content']['address2']])),
                   city = gym['content']['city'],
                   phone = gym['content']['phone'],
                   state = gym['content']['state_abbr'],
                   postcode = gym['content']['zip'],
                   ref = gym['content']['url'],
  -                country = gym['content']['country']
  +                country = gym['content']['country'],
  +                name = html.unescape(gym['content']['title']),
  +                extras = {"number": gym['content']['number']}
                   )
  -                
  -                
  -
  
verification_info: {"golden_diff": "diff --git a/locations/spiders/anytime_fitness.py b/locations/spiders/anytime_fitness.py\n--- a/locations/spiders/anytime_fitness.py\n+++ b/locations/spiders/anytime_fitness.py\n@@ -2,6 +2,8 @@\n import scrapy\n from locations.items import GeojsonPointItem\n import json\n+import html\n+\n \n class AnytimeFitnessSpider(scrapy.Spider):\n     name = 'anytime_fitness'\n@@ -18,14 +20,13 @@\n             yield GeojsonPointItem(\n                 lat = gym['latitude'],\n                 lon = gym['longitude'],\n-                addr_full = '{}, {}'.format(gym['content']['address'], gym['content']['address2']),\n+                addr_full = \", \".join(filter(None, [gym['content']['address'], gym['content']['address2']])),\n                 city = gym['content']['city'],\n                 phone = gym['content']['phone'],\n                 state = gym['content']['state_abbr'],\n                 postcode = gym['content']['zip'],\n                 ref = gym['content']['url'],\n-                country = gym['content']['country']\n+                country = gym['content']['country'],\n+                name = html.unescape(gym['content']['title']),\n+                extras = {\"number\": gym['content']['number']}\n                 )\n-                \n-                \n-\n", "issue": "anytime_fitness.py null values\nThe scraper currently includes address2 whether it is null or not, resulting in \", None\" being appended to many (most?) of the addr:full fields.\n", "before_files": [{"content": "# -*- coding: utf-8 -*-\nimport scrapy\nfrom locations.items import GeojsonPointItem\nimport json\n\nclass AnytimeFitnessSpider(scrapy.Spider):\n    name = 'anytime_fitness'\n    allowed_domains = ['www.anytimefitness.com']\n\n    def start_requests(self):\n        url = 'https://www.anytimefitness.com/wp-content/uploads/gyms.json'\n        yield scrapy.Request(url, callback=self.parse)\n\n    def parse(self, response):\n        gyms = json.loads(response.body_as_unicode())\n\n        for gym in gyms:\n            yield GeojsonPointItem(\n                lat = gym['latitude'],\n                lon = gym['longitude'],\n                addr_full = '{}, {}'.format(gym['content']['address'], gym['content']['address2']),\n                city = gym['content']['city'],\n                phone = gym['content']['phone'],\n                state = gym['content']['state_abbr'],\n                postcode = gym['content']['zip'],\n                ref = gym['content']['url'],\n                country = gym['content']['country']\n                )\n                \n                \n    \n", "path": "locations/spiders/anytime_fitness.py"}]}