本次通过猫眼电影,对春节贺岁大片【满江红】进行数据分析 。而本次我们通过动态接口形式获取评论信息,静态html解析需要额外的字体解析,网上的教程也已经很全了,有兴趣的小伙伴们也可以多多冲浪或和本人探讨哈!
文章插图
满江红影图
一、 接口分析1. 目标站点:猫眼H5
文章插图
接口列表
2. 通过滑动查看评论信息,或点击评论进入评论子页面滑动,即可抓取到相关接口(浏览器F12工具中只能抓取到子评论接口,如果要整个评论的需要抓包工具配合或使用手机抓包)
文章插图
接口详情
3. 评论接口(已加密处理)
aHR0cHM6Ly9tLm1hb3lhbi5jb20vYXBvbGxvL2Fwb2xsb2FwaS9tbWRiL3JlcGxpZXMvY29tbWVudC8xMTY3MTI5MDg5Lmpzb24/X3ZfPXllcyZvZmZzZXQ9NDA=
二、 响应分析
- 通过子评论接口,可以分析出来相关字段(昵称、性别、评分、评论内容、评论点赞量、用户等级等)
{"cmts": [{"Approve": 0,"assistAwardInfo": {"avatar": "","celebrityId": 0,"celebrityName": "","rank": 0,"title": ""},"avatarurl": "https://img.meituan.NET/maoyanuser/e6f7600fa2980a929accb602fde5abaa2776.jpg","channelId": 70001,"content": "在电影院看真的很有氛围!背景音乐也很加分","deleted": false,"id": 1171602285,"ipLocName": "福建","nickName": "腿小菇","time": "2023-02-27 10:24","userId": 1322748722,"userLevel": 3,"vipInfo": "","vipType": 0}],"ocm": {"approve": 8657,"approved": false,"assistAwardInfo": {"avatar": "","celebrityId": 0,"celebrityName": "","rank": 0,"title": ""},"authInfo": "","avatarurl": "https://img.meituan.net/avatar/66fb6e3ef190201864c732a03b5d9be924014.jpg","content": "刚看完满江红,真的好看,这是我看过最值的一部电影,反转反转再反转,真的是永远想不到下一步是什么,而且还很搞笑,搞笑又宏伟,真的描述不出来这个电影的好,都给我去看!满江红!入股不亏!!!!","id": 1167129089,"ipLocName": "辽宁","isMajor": false,"juryLevel": 0,"majorType": 0,"mvid": 1462626,"nick": "Gpc126688235","nickName": "Gpc126688235","oppose": 0,"pro": false,"reply": 680,"score": 5,"spoiler": 0,"supportComment": true,"supportLike": true,"sureViewed": 1,"tagList": {"fixed": [{"id": 1,"name": "购票好评"},{"id": 4,"name": "购票"},{"id": 6,"name": "优质评价"}]},"time": "2023-01-22 12:19","userId": 3164097169,"userLevel": 2,"videoDuration": 0,"vipInfo": "","vipType": 0},"total": 60}
2. 完整comment接口响应示例{"data": {"hotIds": [1167280609,1167187803],"total": 16521,"comments": [{"avatarUrl": "https://img.meituan.net/maoyanuser/80cdf9a184d40eb9ecc0e5d170f3e45d11928.png","buyTicket": false,"channelId": 3,"content": "还行吧,没有看开心 ","delete": false,"follow": false,"gender": 1,"id": 1171756165,"imageUrls": [],"ipLocName": "山东","likedByCurrentUser": false,"major": false,"movie": {"id": 0,"sc": 0},"movieId": 1462626,"nick": "淘嘉豪","replyCount": 0,"score": 9,"showApprove": false,"showVote": false,"spoiler": false,"startTime": "1677923460000","tagList": [{"id": 1,"name": "购票好评"},{"id": 4,"name": "购票"}],"time": 1677923460000,"ugcType": 11,"upCount": 0,"userId": 71317227,"userLevel": 2,"vipType": 0},],"t2total": 0,"myComment": {}},"paging": {},"ts": 1677956823197}
推荐阅读
- Linux系统是什么(python在windows上)
- sql是什么(学了python可以干嘛)
- 怎么制作数据分析表 销售月报表数据分析
- 数据分析报告范文模板__数据分析报告范文?
- 用Python免登录实现域名解析!
- python是什么意思的简单介绍
- 通向优秀数据分析师的六个阶梯
- python基础教程(scratch和python哪个编程更适合小学
- 如何在 Python 中使用生成器和迭代器?
- wxPython -高级控件之列表框ListBox