title: scrapy: access spider class variable in pipeline __init__
body: <p>I know you can access spider variables in process_item(), but how can I access spider variables in pipeline <strong>init</strong> function?</p>
  
  <pre><code>class SiteSpider(CrawlSpider):
     def __init__(self):
          self.id = 10
  
  class MyPipeline(object):
       def __init__(self):
          ...
  </code></pre>
  
  <p>I also need to access CUSTOM_SETTINGS_VARIABLE in MyPipeline.</p>