欢迎来到欣怡建站!我们致力于提供优质的网站建站服务
注册

Dedecms 5.5 实现自定义标题处理(附采集规则)

相关案例演示

Dedecms 5.5 实现自定义标题处理,在 {dede:function}@me='64edu.com'.@me{/dede:function}中添加自定义的处理方法,就可以实现自定义dedecms5.5 5.3的接口处理效果 

以下为引用的内容:

{dede:sppage sptype='full'}{/dede:sppage} 

{dede:previewurl}{/dede:previewurl} 

{dede:keywordtrim}{/dede:keywordtrim} 

{dede:descriptiontrim}{/dede:descriptiontrim} 

{dede:item field='title' value='' isunit='' isdown=''} 

{dede:match}<title>[内容]</title>{/dede:match} 

{dede:trim replace=""}_开 发 者_网上学园_科技时代_新浪网{/dede:trim} 

{dede:function}@me='64edu.com'.@me{/dede:function} 

{/dede:item}{dede:item field='writer' value='' isunit='' isdown=''} 

{dede:match}{/dede:match} 

 

{dede:function}{/dede:function} 

{/dede:item}{dede:item field='source' value='' isunit='' isdown=''} 

{dede:match}{/dede:match} 

 

{dede:function}{/dede:function} 

{/dede:item}{dede:item field='pubdate' value='' isunit='' isdown=''} 

{dede:match}{/dede:match} 

 

{dede:function}{/dede:function} 

{/dede:item}{dede:item field='body' value='' isunit='1' isdown='1'} 

{dede:match}<tr><th class=f24><font color=#05006C>[内容]<table width=565 border=0 cellspacing=0 cellpadding=0>{/dede:match} 

{dede:trim replace=''}<a([^>]*)>(.*)</a>{/dede:trim} 

{dede:trim replace=''}<!--(.*)-->{/dede:trim} 

{dede:trim replace=''}<img([^>]*)>{/dede:trim} 

{dede:trim replace=''}<object([^>]*)>(.*)</object>{/dede:trim} 

{dede:trim replace=''}<embed([^>]*)>(.*)</embed>{/dede:trim} 

{dede:trim replace=''}<iframe([^>]*)>(.*)</iframe>{/dede:trim} 

{dede:function}{/dede:function} 

{/dede:item}

测试5.5的采集规则

 

以下为引用的内容:

BASE64:e2RlZGU6bGlzdGNvbmZpZ30NCntkZWRlOm5vdGVpbmZvIG5vdGVuYW1lPSJqYXZhc2NycHQiIGNoYW5uZWxpZD0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ey9kZWRlOm1hdGNofQ0KICAgDQogICB7ZGVkZTpmdW5jdGlvbn17L2RlZGU6ZnVuY3Rpb259DQp7L2RlZGU6aXRlbX17ZGVkZTppdGVtIGZpZWxkPSdib2R5JyB2YWx1ZT0nJyBpc3VuaXQ9JzEnIGlzZG93bj0nMSd9DQogICB7ZGVkZTptYXRjaH08dHI+PHRoIGNsYXNzPWYyND48Zm9udCBjb2xvcj0jMDUwMDZDPlvlhoXlrrldPHRhYmxlIHdpZHRoPTU2NSBib3JkZXI9MCBjZWxsc3BhY2luZz0wIGNlbGxwYWRkaW5nPTA+ey9kZWRlOm1hdGNofQ0KICAge2RlZGU6dHJpbSByZXBsYWNlPScnfTxhKFtePl0qKT4oLiopPC9hPnsvZGVkZTp0cmltfQ0Ke2RlZGU6dHJpbSByZXBsYWNlPScnfTwhLS0oLiopLS0+ey9kZWRlOnRyaW19DQp7ZGVkZTp0cmltIHJlcGxhY2U9Jyd9PGltZyhbXj5dKik+ey9kZWRlOnRyaW19DQp7ZGVkZTp0cmltIHJlcGxhY2U9Jyd9PG9iamVjdChbXj5dKik+KC4qKTwvb2JqZWN0PnsvZGVkZTp0cmltfQ0Ke2RlZGU6dHJpbSByZXBsYWNlPScnfTxlbWJlZChbXj5dKik+KC4qKTwvZW1iZWQ+ey9kZWRlOnRyaW19DQp7ZGVkZTp0cmltIHJlcGxhY2U9Jyd9PGlmcmFtZShbXj5dKik+KC4qKTwvaWZyYW1lPnsvZGVkZTp0cmltfQ0KICAge2RlZGU6ZnVuY3Rpb259ey9kZWRlOmZ1bmN0aW9ufQ0Key9kZWRlOml0ZW19DQp7L2RlZGU6aXRlbWNvbmZpZ30=:END

作者:欣怡建站 挑错 时间:2020-01-09 16:21
首先声明,只要是我们的vip会员所有源码均可以免费下载,不做任何限制
☉本站的源码不会像其它下载站一样植入大量的广告。为了更好的用户体验以后坚持不打水印
☉本站只提供精品源码,源码在于可用,不在多!!希望在这里找到你合适的。
☉本站提供的整站程序,均带数据及演示地址。可以在任一源码详情页查看演示地址
☉本站所有资源(包括源码、模板、素材、特效等)仅供学习与参考,请勿用于商业用途。
☉如有其他问题,请加网站客服QQ(984818011)进行交流。
相关教程
在线客服