天涯社区论坛贴子粗加工
发表于:2024-09-22 作者:千家信息网编辑
千家信息网最后更新 2024年09月22日,VBA 从天涯论坛的帖子中提取正文Sub 天涯贴子简单抓取() Dim cnt As Integer arr = Array("评论", "举报", "楼主", "作者", "草稿", "热贴",
千家信息网最后更新 2024年09月22日天涯社区论坛贴子粗加工
VBA 从天涯论坛的帖子中提取正文
Sub 天涯贴子简单抓取() Dim cnt As Integer arr = Array("评论", "举报", "楼主", "作者", "草稿", "热贴", "论坛", "注册", "广告", "推荐") '屏蔽词汇 For y = 1 To 2 Set ie = CreateObject("internetexplorer.application") With ie .Navigate "http://bbs.tianya.cn/post-free-5758447-" & y & ".shtml" '5758447-1.shtml ,5758447-2.shtml等 ' .Visible = True Do Until ie.ReadyState = 4 DoEvents Loop For x = 0 To .Document.All.tags("div").Length - 1 '正文是在div中,div集合长度 ss = .Document.All.tags("div")(x).innertext '正文内容 len_ss = Len(ss) '正文长度 If len_ss < 100 Then '正文长度太短,直接跳到下一个div GoTo 100 Else For Each keys In arr If InStr(ss, keys) > 0 Then GoTo 100 '如有屏蔽的词语出现,直接跳到下一个div Next cnt = cnt + 1 Debug.Print cnt & ":" & .Document.All.tags("div")(x).innertext '输出合乎要求的div End If 100 Next x End With Next y ie.Quit Set ie = NothingEnd Sub
正文
天涯
论坛
长度
贴子
作者
内容
帖子
广告
是在
楼主
草稿
词汇
词语
推荐
评论
输出
社区
粗加工
数据库的安全要保护哪些东西
数据库安全各自的含义是什么
生产安全数据库录入
数据库的安全性及管理
数据库安全策略包含哪些
海淀数据库安全审计系统
建立农村房屋安全信息数据库
易用的数据库客户端支持安全管理
连接数据库失败ssl安全错误
数据库的锁怎样保障安全
网络安全汇编
服务器网口指示灯绿色常亮
存储服务器分类
sql实验六数据库安全
随州软件开发价格
一个服务器有几个公网ip
usb 服务器
项目没有数据库怎么操作
四个字的软件开发品牌
黄浦区智能软件开发推荐咨询
宜章软件开发工程师培训学校
爱推大数据库
怎么攻击cs服务器
下列关于数据库的说法不正确的有
数据库表结构变更影响
达梦数据库压缩工具
表格数据添加到数据库中
银川政务软件开发怎么样
汕头pc软件开发定制
国家网络安全宣传周宣传报道
中国网络安全法律缺失
网络安全性保障
三国之刃服务器忘记了
一个服务器有几个公网ip
服务器安全性运维图片
服务器的真实事件
h1z1切换服务器就闪退
服务器登录管理软件
数据库创建商品表
数据库 utf8