scrapy how to import the settings to override it
Question: this is my code

    
    
    class Test(Spider):
        self.settings.overrides['JOBDIR']= "seen"
    

I got:

    
    
      File "C:\Python27\lib\site-packages\scrapy\spider.py", line 46, in settings
        return self.crawler.settings
      File "C:\Python27\lib\site-packages\scrapy\spider.py", line 41, in crawler
        assert hasattr(self, '_crawler'), "Spider not bounded to any crawler"
    AssertionError: Spider not bounded to any crawler
    

I am extending `Spider` and I am not using `Crawler` because I don't have
links nor rules to follow

I am guessing that my problem is because I didn't import the settings well and
I need your help please


Answer: In order to change the settings in the spider you can:

    
    
    class TestSpider(Spider):
    
        def set_crawler(self, crawler):
            super(TestSpider, self).set_crawler(crawler)
            crawler.settings.set('JOBDIR','seen')
    
        # rest of spider code
    

