

@classmethod
def from_crawler(cls, crawler):
    interval = crawler.settings.getfloat('LOGSTATS_INTERVAL')
    if (not interval):
        raise NotConfigured
    o = cls(crawler.stats, interval)
    crawler.signals.connect(cls.spider_opened, signal=signals.spider_opened)
    crawler.signals.connect(o.spider_closed, signal=signals.spider_closed)
    return o

dataset/ETHPy150Open wcong/ants/ants/contrib/logstats.py LogStats.from_crawler/VarMisuse@55/67 `o`->`cls`