dede3.1分页文字采集过滤规则详说(图文教程)续二
稍微了解dede采集规则的朋友上篇内容完全可以略过,下面看看如何以静制动、以不变就万变地解决分页采集问题。
二、采集新目标
目标地址:
1、http://www.tiansou.net/Html/Y_CYFW/R_Gzzj/F_Gzjh/index.html
2、http://www.tiansou.net/Html/Y_CYFW/R_Gzzj/F_Gzjh/2007-2/9/20070209110903558.html
之所以选取两个目标页面,是因为以上的两个页面一个有分页,而另一个没有,并且在分页和全文取样部分有较大的差别。以下的说明是在为采集目标地址(首页)全部链接的基础上改动的,个别地方会显得蛇足,只为说明的方便。
目标文字部分头部代码1:
=700) window.open('/upload/200743213057697.gif');" src="http://www.bkjia.com/uploads/allimg/131016/06064L216-0.gif" onload="if(this.width>'700')this.width='700';" border=0>
目标文字部分头部代码2:
=700) window.open('/upload/200743213057679.gif');" src="http://www.bkjia.com/uploads/allimg/131016/06064LJ7-1.gif" onload="if(this.width>'700')this.width='700';" border=0>
通过比较不难发现,两个文字部分的开始采集部分能确定下来为描黑部分,开头部分好说,代码如下:
复制代码 代码如下:
目标文尾及分页区域代码1:
=700) window.open('/upload/200743213057312.gif');" src="http://www.bkjia.com/uploads/allimg/131016/06064K143-2.gif" onload="if(this.width>'700')this.width='700';" border=0>
目标文尾及分页区域代码2:
=700) window.open('/upload/200743213057807.gif');" src="http://www.bkjia.com/uploads/allimg/131016/06064H347-3.gif" onload="if(this.width>'700')this.width='700';" border=0>
比较一下两个结尾,尽管想把第一个的结尾再往前提一点,但没法子,要考虑到全部链接的共同部分,就只好取描黑的部分了,这也给今后确定过滤规则添了点麻烦,这是后话。先把结尾部分确定了吧:
复制代码 代码如下:

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

SublimeText3 English version
Recommended: Win version, supports code prompts!

Safe Exam Browser
Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

Dreamweaver Mac version
Visual web development tools

EditPlus Chinese cracked version
Small size, syntax highlighting, does not support code prompt function

SublimeText3 Mac version
God-level code editing software (SublimeText3)