修改采集节点
网址索引
内容配置
网址索引
内容配置
节点基本信息
节点名称:
目标页面编码:
GetAtt('sourcelang')=='gb2312') echo " checked='1'"; ?>/> GB2312
GetAtt('sourcelang')=='utf-8') echo " checked='1'"; ?>/> UTF8
GetAtt('sourcelang')=='big5') echo " checked='1'"; ?>/> BIG5
区域匹配模式:
GetAtt('macthtype')=='regex') echo " checked='1'"; ?>/> 正则表达式
GetAtt('macthtype')=='string') echo " checked='1'"; ?>/> 字符串
内容导入顺序:
GetAtt('cosort')=='asc') echo " checked='1'"; ?>/> 与目标站一致
GetAtt('cosort')=='desc') echo " checked='1'"; ?>/> 与目标站相反
以下选项仅在开启防盗链模式才需设定,如果目标网站没有防盗链功能请不要开启,否则会降低采集速度。
防盗链模式:
GetAtt('isref')=='no') echo " checked='1'"; ?>/> 不开启
GetAtt('isref')=='yes') echo " checked='1'"; ?>/> 开启
资源下载超时时间:
秒
引用网址:
(一般为目标网站其中一个文章页的网址)
列表网址获取规则
来源属性:
GetAtt('sourcetype')=='batch') echo " checked='checked'"; ?>/> 批量生成列表网址
GetAtt('sourcetype')=='hand') echo " checked='checked'"; ?>/> 手工指定列表网址
GetAtt('sourcetype')=='rss') echo " checked='checked'"; ?>/> 从RSS中获取
RSS网址:
批量生成地址设置:
匹配网址:
(如:http://www.uniternet.com/html/test/list_(*).html,如果不能匹配所有网址,可以在手工指定网址的地方输入要追加的网址)
(*)从
到
(填写页码或规律递增数字) 每页递增:
/> 启用多栏目通配(#)
'>
手工指定网址:
在指定了通配规则后有些不能匹配的网址也可以在这里指定。
GetInnerText(); ?>
'>
多栏目通配规则:
如果目标网站使用单一模板,可以在匹配网址中用"(#)"表示近似网址的差异,然后在通配规则中设定集合,并且可以指定导出栏目。
GetInnerText()) : ''); ?>
示例格式:[(#)=>labs/list_3; (*)=>1-25; typeid=>7] 匹配网址:http://www.aaa.com/(#)_(*).html
文章网址匹配规则
内容网址匹配模式:
GetAtt('urlrule')=='area') echo " checked='1'"; ?>/> 指定包含有文章网址的区域(可以获取区域的网址、标题、图片等信息)
GetAtt('urlrule')=='regx') echo " checked='1'"; ?>/> 指定网址正则表达式(仅能获得网址信息)
网址的正则表达式:
GetInnerText(); ?>
包含有文章网址的区域设置:
区域开始的HTML:
GetInnerText(); ?>
区域结束的HTML:
GetInnerText(); ?>
如果链接中含有图片:
GetAtt('listpic')=='0') echo " checked='1'"; ?>/> 不处理
GetAtt('listpic')=='1') echo " checked='1'"; ?>/> 采集为缩略图
对区域网址进行再次筛选:
(使用正则表达式)
必须包含:
(优先级高于后者)
不能包含:
网页内容获取规则
1、匹配规则:在匹配区域规则中,规则一般为“
起始无重复HTML
[内容]
结尾无重复HTML
”(普通匹配,非正则)。
2、字段值:如果指定的字段没有指定区域匹配规则,用这个值作为默认值。
3、过滤规则:如果有多个规则,用
{dede:trim replace=""}规则一{/dede:trim}
{dede:trim replace=""}规则二{/dede:trim}
...
表示,如果要替换成指定的值,在 replace=""里设置即可
预览网址:
内容分页导航所在的区域匹配规则:
GetInnerText()); ?>
GetAtt('sptype')=='full') echo " checked='1'"; ?>/> 全部列出的分页列表
GetAtt('sptype')=='next') echo " checked='1'"; ?>/> 上下页形式或不完整的分页列表
以下为固定的采集项目:
(项目点击可展开/隐藏,内容摘要、关键字、缩略图系统会用正则进行自动匹配)
关键字过滤内容:
摘要过滤内容:
文章标题
匹配规则:
过滤规则:
文章作者
匹配规则:
过滤规则:
文章来源
匹配规则:
过滤规则:
发布时间
匹配规则:
过滤规则:
以下是针对模型设置的采集项目:
GetOne("Select * From `#@__channeltype` where id='{$channelid}' "); $dtp = new DedeTagParse(); $dtp->SetNameSpace('field','<','>'); $dtp->LoadString($row['fieldset']); foreach($dtp->CTags as $ctag) { //采集禁用的字段 $notsend = $ctag->GetAtt('notsend'); if($notsend==1) continue; $fieldtype = $ctag->GetAtt('type'); $tname = $ctag->GetTagName(); $iname = $ctag->GetAtt('itemname'); if(isset($notes[$tname]['item'])) { $tvalue = $notes[$tname]['item']->GetAtt('value'); $tisunit = $notes[$tname]['item']->GetAtt('isunit'); $tisdown = $notes[$tname]['item']->GetAtt('isdown'); $tmatch = $notes[$tname]['match']; $ttrim = $notes[$tname]['trim']; $tfunction = $notes[$tname]['function']; }else { $tvalue = $tisunit = $tisdown = $tmatch = $ttrim = $tfunction = ''; } ?>
字段值:
匹配规则:
/> 分页内容字段(规则中只允许单一的该类型字段)
/> 下载字段里的多媒体资源
过滤规则:
自定义处理接口:
函数或程序的变量
@body 表示原始网页 @litpic 缩略图
@me 表示当前标记值和最终结果