获取网络数据并保存为json文件
发布网友
发布时间:2022-12-05 09:33
我来回答
共1个回答
热心网友
时间:2023-12-01 22:43
请求接口: https://www.apiopen.top/satinApi?type=1&page=1 获取网络数据。
将内容中所有的name和text对应的值取出,并且保存到一个json文件中,保存的格式:
[{“name”:”张三”, “text”:”哈哈,让我们一起自由的飞翔”}, {“name”:”喒你家玻璃”, “text”:”截图暂停,截到的将会是对你爱情的预言三词!”}]
数据框架:
{"code":200,"msg":"成功!","data":[{"type":"10","text":"我大中华的旗袍就是美,姐夫们,用一句话来表达你心中对妹子的赞美吧","user_id":"19837434","name":"蛮夷阿
涂","screen_name":"蛮夷阿涂","profile_image":" http://wimg.spriteapp.cn/profile/large/2017/03/10/58c2180891031_mini.jpg ","created_at":"2017-09-09 12:52:02","create_time":null,"passtime":"2017-09-09 12:52:02","love":"1264","hate":"110","comment":"620","repost":"40","bookmark":"450","bimageuri":"","voiceuri":null,"voicetime":null,"voicelength":null,"status":"4","theme_id":"54779","theme_name":"*",