网站抓取说明

网站抓取:
1.百度 关键字抓取(如 北京 公司,北京 企业)
2.百度 企业名称抓取(公司名称)
初步抓取的都是通过百度,采集到的title和bd_url(并不是网站的url,是指百度跳转的url)
抓第一页就好,不必抓取第二页
3.去掉死链接,去掉黄页等非网站数据,
bd_name like '%主页%' or
bd_name like '%官网%' or
bd_name like '%官方网站%'or
bd_name like '%集团%'or
bd_name like '%首页%'
筛选出 title 包含这写关键词的数据,相对准确一些,不然数量太大
4.根据抓下来数据的bd_url,采集网站内的web_url,web_title,web_context,保存
5.去重复,根据web_url和web_title去掉黄页
6.从web_context中获取 公司名称、联系电话、地址、ICP信息,通过地址和ICP确定网站是属于哪一个区域的网站, 没有ICP备案号的网站可能就存在问题,有待研究


-----------------从网页内容中获取ICP和地址等信息的有关sql(网站内容中截取出相关信息,最好是文本,不要存html)
[color=red]1.ICP[/color]
update table tt set tt.ent_icp=substr(tt.web_text,instr(tt.web_text,'京ICP',1)-1,30)
where tt.web_text like '%京ICP%'

update table tt set tt.ent_icp=substr(tt.web_text,instr(tt.web_text,'ICP',1)-1,30)
where tt.web_text like '%ICP%' and tt.ent_icp is null
[color=red]2.地址[/color]
update table tt set tt.ent_address=substr(tt.web_text,instr(tt.web_text,'地址',1),50)
where tt.web_text like '%地址%'
[color=red]3.电话[/color]
update table tt set tt.tellphone=substr(tt.web_text,instr(tt.web_text,'电话',1),20)
where tt.web_text like '%电话%'

update table tt set tt.tellphone=substr(tt.web_text,instr(tt.web_text,'热线',1),20)
where tt.web_text like '%热线%' and tt.tellphone is null
[color=red]4.公司名称[/color]

update table tt set tt.ent_name=substr(tt.web_text,instr(tt.web_text,'版权所有',1)-30,30)
where tt.web_text like '%版权所有%'
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值