- 保存为json文件
- scrapy crawl urfileName -o items.json
- store the data in MongoDB
- 在setting.py 里面配置mongodb
- ITEM_PIPELINES = [‘your file name.monogpipeline’]
- MONGODB_SERVER = “locahost”
- MONGODB_PORT = 27017
- MONGODB_DB = “stackoverflow”
- MONGODB_COLLECTION = “questions”
点击查看原版教程