single_crawler.py 文件源码

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

项目:Newscrawler 作者: JBH168 项目源码 文件源码
def load_crawler(self, crawler, url, ignore_regex):
        """
        Loads the given crawler with the given url.

        :param class crawler: class of the crawler to load
        :param str url: url to start the crawler with
        :param regex ignore_regex: to be able to ignore urls that match this
                                   regex code
        """
        self.process = CrawlerProcess(self.cfg.get_scrapy_options())
        self.process.crawl(
            crawler,
            self.helper,
            url=url,
            config=self.cfg,
            ignore_regex=ignore_regex)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号