log.py 文件源码

python
阅读 20 收藏 0 点赞 0 评论 0

项目:domain-discovery-crawler 作者: TeamHG-Memex 项目源码 文件源码
def from_crawler(cls, crawler) -> 'RequestLogMiddleware':
        log_path = crawler.settings.get('RESPONSE_LOG_FILE')
        if not log_path:
            raise NotConfigured('RESPONSE_LOG_FILE not defined')
        jl_logger = get_jl_logger(log_path)
        threshold = crawler.settings.getfloat('PAGE_RELEVANCY_THRESHOLD', 0.5)
        return cls(jl_logger=jl_logger, relevancy_threshold=threshold)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号