# -*- coding: utf-8 -*-
import scrapy
from locations.items import GeojsonPointItem
import json

class AnytimeFitnessSpider(scrapy.Spider):
    name = 'anytime_fitness'
    allowed_domains = ['www.anytimefitness.com']

    def start_requests(self):
        url = 'https://www.anytimefitness.com/wp-content/uploads/gyms.json'
        yield scrapy.Request(url, callback=self.parse)

    def parse(self, response):
        gyms = json.loads(response.body_as_unicode())

        for gym in gyms:
            yield GeojsonPointItem(
                lat = gym['latitude'],
                lon = gym['longitude'],
                addr_full = '{}, {}'.format(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']
                )
                
                
    

@@ -89,16 +89,17 @@
 t json%0A%0A
+%0A
 class An
@@ -632,24 +632,32 @@
 l = 
-'%7B%7D, %7B%7D'.format(
+%22, %22.join(filter(None, %5B
 gym%5B
@@ -705,16 +705,18 @@
 dress2'%5D
+%5D)
 ),%0A     
@@ -1029,43 +1029,4 @@
   )%0A
-                %0A                %0A    %0A

Fix addr_full bug with anytime_fitness spider