本文整理汇总了Python中Crawler.Crawler.save_crawler_data方法的典型用法代码示例。如果您正苦于以下问题:Python Crawler.save_crawler_data方法的具体用法?Python Crawler.save_crawler_data怎么用?Python Crawler.save_crawler_data使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Crawler.Crawler
的用法示例。
在下文中一共展示了Crawler.save_crawler_data方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_crawl_clientIntegrations
# 需要导入模块: from Crawler import Crawler [as 别名]
# 或者: from Crawler.Crawler import save_crawler_data [as 别名]
def test_crawl_clientIntegrations(self):
parameter_data = FileOperations.get_from_JSON_file("./test/search_integration.json")
crawlers = parameter_data["crawlers"]
crawlerName = "Integration"
c = Crawler(crawlerName, parameters=crawlers[crawlerName])
data = c.crawl_native()
self.assertTrue(len(data) > 0)
c.save_crawler_data(data, crawlers[crawlerName]["output"])
示例2: test_crawl_multithread_mmcoreAsync
# 需要导入模块: from Crawler import Crawler [as 别名]
# 或者: from Crawler.Crawler import save_crawler_data [as 别名]
def test_crawl_multithread_mmcoreAsync(self):
parameter_data = FileOperations.get_from_JSON_file("./test/search_async.json")
crawlers = parameter_data["crawlers"]
crawlerName = "dotAsync"
c = Crawler(crawlerName, parameters=crawlers[crawlerName])
data = c.crawl_native(threads=None)
self.assertTrue(len(data) > 0)
c.save_crawler_data(data, crawlers[crawlerName]["output"])