File: extensions.py

package info (click to toggle)
python-scrapy 0.24.2-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 3,240 kB
  • ctags: 4,259
  • sloc: python: 21,170; xml: 199; makefile: 67; sh: 44
file content (10 lines) | stat: -rw-r--r-- 294 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
"""A test extension used to check the settings loading order"""

class TestExtension(object):

    def __init__(self, settings):
        settings.set('TEST1', "%s + %s" % (settings['TEST1'], 'started'))

    @classmethod
    def from_crawler(cls, crawler):
        return cls(crawler.settings)