Exemple #1
0
def get_application():
    settings = get_scraper_settings()
    apppath = settings.get('DAEMON_APPLICATION', 'scraper.daemon.app.application')
    appfunc = load_object(apppath)
    return appfunc(settings)
Exemple #2
0
 def __init__(self):
     settings = get_scraper_settings()
     loader = SpiderLoader.from_settings(settings)
     self.spider_names = loader.list()
     self.server = redis.StrictRedis(host=settings.get('REDIS_HOST'), port=settings.get('REDIS_PORT'))