设为首页加入收藏业务一览表公司历程公司介绍联系我们
当前位置网站运营 >> Dedecms 5.5 实现自定义标题处理(附采集规矩)

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}http://tech.sina.com.cn/c/2003-04-18/18689.html{/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:e2RlZGU6bGlzdGNvbmZpZ30NCntkZWRlOm5vdGVpbmZvIG5vdGVuYW1lPSJqYXZhc2NycHQiIGN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U6bWF0Y2h9ey9kZWRlOm1hdGNofQ0KICAgDQogICB7ZGVkZTpmdW5jdGlvbn17L2RlZGU6ZnVuY3Rpb259DQp7L2RlZGU6aXRlbX17ZGVkZTppdGVtIGZpZWxkPSdib2R5JyB2YWx1ZT0nJyBpc3VuaXQ9JzEnIGlzZG93bj0nMSd9DQogICB7ZGVkZTptYXRjaH08dHI+PHRoIGNsYXNzPWYyND48Zm9udCBjb2xvcj0jMDUwMDZDPlvlhoXlrrldPHRhYmxlIHdpZHRoPTU2NSBib3JkZXI9MCBjZWxsc3BhY2luZz0wIGNlbGxwYWRkaW5nPTA+ey9kZWRlOm1hdGNofQ0KICAge2RlZGU6dHJpbSByZXBsYWNlPScnfTxhKFtePl0qKT4oLiopPC9hPnsvZGVkZTp0cmltfQ0Ke2RlZGU6dHJpbSByZXBsYWNlPScnfTwhLS0oLiopLS0+ey9kZWRlOnRyaW19DQp7ZGVkZTp0cmltIHJlcGxhY2U9Jyd9PGltZyhbXj5dKik+ey9kZWRlOnRyaW19DQp7ZGVkZTp0cmltIHJlcGxhY2U9Jyd9PG9iamVjdChbXj5dKik+KC4qKTwvb2JqZWN0PnsvZGVkZTp0cmltfQ0Ke2RlZGU6dHJpbSByZXBsYWNlPScnfTxlbWJlZChbXj5dKik+KC4qKTwvZW1iZWQ+ey9kZWRlOnRyaW19DQp7ZGVkZTp0cmltIHJlcGxhY2U9Jyd9PGlmcmFtZShbXj5dKik+KC4qKTwvaWZyYW1lPnsvZGVkZTp0cmltfQ0KICAge2RlZGU6ZnVuY3Rpb259ey9kZWRlOmZ1bmN0aW9ufQ0Key9kZWRlOml0ZW19DQp7L2RlZGU6aXRlbWNvbmZpZ30=:END

原文地址:http://www.liehuo.net/a/200910/139884.html

[来源:原创] [作者:嵊州新时代建站] [日期:10-01-22] [阅读:]