title: Python (Scrapy) - How can call a self object from __init__ to a custom_settings?
body: <p>I have an object called <code>url_local</code> inside of the <code>__init__</code> method and I want to pass as an object to <code>custom_settings['FEED_URI']</code> to rename my json format to something like 'data/vivareal/vivareal_<code>url_local</code>.json'. Can I have some help on it?</p>
  
  <pre><code>class VivarealCrawl(scrapy.Spider):
  name = 'vivareal'
  allowed_domains = ['www.vivareal.com.br']
  
  def __init__(self, *args, **kwargs):
      super(VivarealCrawl, self).__init__(*args, **kwargs)
      arg_cidade = kwargs.get('cidade')
      url_vivareal_venda = 'https://www.vivareal.com.br/venda/'
      url_tipologia_terreno1 = '/lote-terreno_residencial/?__vt=ald:2'
      url_tipologia_terreno2 = '/lote-terreno_comercial'
      url_local = 'ceara/fortaleza'
  
  
      if arg_cidade is not None:
          if arg_cidade.lower() == 'bh':
              url_local = 'minas-gerais/belo-horizonte'
          elif arg_cidade.lower() == 'bel':
              url_local = 'para/belem'
          elif arg_cidade == 'sal':
              url_local='bahia/salvador'
          elif arg_cidade == 'arj':
              url_local = 'sergipe/aracaju'
  
      url1 = ''.join([url_vivareal_venda, url_local, url_tipologia_terreno1])
      url2 = ''.join([url_vivareal_venda, url_local, url_tipologia_terreno2])
  
      self.start_urls = [
          url1, # terreno residencial
          url2  # terreno comercial
      ]
  
  # location of json file
  custom_settings = {
      'FEED_EXPORT_ENCODING': 'utf-8'
      , 'FEED_FORMAT': "json"
      , 'FEED_URI': 'data/vivareal/vivareal.json'
      , 'CLOSESPIDER_PAGECOUNT': 5
  }
  </code></pre>