#!/usr/bin/env python
# Version = 3.5.2
# __auth__ = '无名小妖'
import json
with open('hellospider/items.json') as f:
rownum = 0
new_list = json.load(f)
for i in new_list:
rownum += 1
print("""line{}:
title:{},
author:{},
reply:{}.""".format(rownum,
i['title'][0],
i['author'][0],
i['reply'][0]))
这个是处理实例,参考https://www.cnblogs.com/wumingxiaoyao/p/6183101.html。
最后
以上就是粗犷牛排最近收集整理的关于读取scrapy生成的json数据的全部内容,更多相关读取scrapy生成内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复