实战爬取网易云评价(2020年2月25日17:40:25)
一、首先要了解一下网易云的一些接口api
这里传送门:https://blog.csdn.net/hackerfei1212/article/details/104500895
二、知识点
1. jsonpath的使用寻找json里的内容
jsonpath.jsonpath(job,'$..content')[0] #$表示从头匹配..表示依次寻找
2. pandas的使用
Pandas 数据框类是一个表(Table)类的数据结构:
首行是栏目 (Column),最左侧是行数 (Row Number),也可以叫索引 (Index)
https://zhuanlan.zhihu.com/p/88632689学习网址
pd.DataFrame(data) #创建
df = pd.DataFrame(columns=['A', 'B', 'C'], index=['id 1', 'id 2', 'id 3'])#创建一个
3. time的使用
将时间格式化 https://www.runoob.com/python/python-date-time.html学习网址
time