当前位置:网站首页>网络爬虫终篇:向10万级网易云用户发送定向消息
网络爬虫终篇:向10万级网易云用户发送定向消息
2022-06-26 21:29:00 【浪漫的数据分析】
本文目标:
上篇我们获得了评论用户ID及主页地址。本篇就可以基于这些数据进行一些数据分析和市场操作。理论上学会了本文的方法,你可以在任何一个网页发送广告信息,本文具有被坏人利用的可能性,因此设置了收费,而这一套爬虫教程,如果在网易云课堂找网课教,学费要1200元左右。网课的暴利还是巨大的。终极目标达成:
1、通过热门歌手,抓取歌曲ID。
2、通过歌曲ID,抓取评论用户ID。
3、通过评论用户ID,发送定向推送消息。
上两篇完成了步骤1、步骤2,本文完成步骤3.
总结篇:requests和selenium的区别:requests无页面的方法获取歌曲ID,速度比较快,但是只能获取一些无需登录的公开网页,如果需要用户登录和验证,requests将无法做到。
selenium的优势在于完全模仿人打开网页的操作,就好像你雇佣了一个助手帮你做事一样,非常直观,也不会被禁止访问。而且对于需要用户登录的界面(如微博等),用selenium能轻松跳过验证的麻烦环节。
上篇我们用MYSQL存储爬取用户的主页信息,本篇将支持错误重做,每处理完一条记录就打一个处理标志位Y,和我们生产系统的做法类似。
步骤1:查询用户lD和主页的表
这里需要查询u
边栏推荐
- How to analyze financial expenses
- leetcode刷题:字符串05(剑指 Offer 58 - II. 左旋转字符串)
- [Bayesian classification 2] naive Bayesian classifier
- Student information management system based on SSH Framework
- VB.net类库,获取屏幕内鼠标下的颜色(进阶——3)
- 股票炒股注册开户有没有什么风险?安全吗?
- Y48. Chapter III kubernetes from introduction to mastery -- pod status and probe (21)
- 基于QT实现简单的连连看小游戏
- JWT operation tool class sharing
- Talk about my remote work experience | community essay solicitation
猜你喜欢
DAST black box vulnerability scanner part 5: vulnerability scanning engine and service capability
The importance of using fonts correctly in DataWindow
Looking back at the moon
【protobuf 】protobuf 昇級後帶來的一些坑
The relationship between the development of cloud computing technology and chip processor
Chapter 2 construction of self defined corpus
leetcode刷题:字符串01(反转字符串)
Redis + guava local cache API combination, performance burst!
GEE:计算image区域内像素最大最小值
【贝叶斯分类3】半朴素贝叶斯分类器
随机推荐
VB.net类库——4给屏幕截图,裁剪
会计要素包括哪些内容
【贝叶斯分类3】半朴素贝叶斯分类器
Fixed length memory pool
基于启发式搜索的一字棋
财务费用分析怎么分析
VB.net类库,获取屏幕内鼠标下的颜色(进阶——3)
lotus configurations
Y48. Chapter III kubernetes from introduction to mastery -- pod status and probe (21)
如何在 SAP BTP 平台上启用 HANA Cloud 服务
回首望月
Stop being a giant baby
Sword finger offer II 098 Number of paths / Sword finger offer II 099 Sum of minimum paths
0 basic C language (3)
Leetcode question brushing: String 02 (reverse string II)
Muke 8. Service fault tolerance Sentinel
0基础学c语言(2)
第2章 构建自定义语料库
Chapter 2 construction of self defined corpus
Idea error: process terminated