def estimate_traffic():
"""
Analyze traffic of the scraped blogs.
"""
process = CrawlerProcess(settings)
blogs_file = get_latest_file(settings['BLOGS_FEED_DIR'])
with open(blogs_file) as f:
blogs = json.load(f)
process.crawl(TrafficSpider, blogs)
process.start() # the script will block here until the crawling is done
评论列表
文章目录