Home  >  Article  >  Backend Development  >  China Webmaster Station For Dede4.0 Collection Rules_PHP Tutorial

China Webmaster Station For Dede4.0 Collection Rules_PHP Tutorial

WBOY
WBOYOriginal
2016-07-21 15:55:19932browse

转载请注明出自落伍im286.com,本贴地址:http://www.im286.com/viewthread.php?tid=1991813
只差两分就落伍了,特献出中国站长站 For Dede4.0 的采集规则,希望大家能够支持我落伍,谢谢了!!!

下面的规则为网站运营  >> 搜索优化 的采集规则,其他栏目的规则只要把“来源网址”和“文章网址需包含”这两项改成你想采集栏目的网址和目录。

如想采集站长在线 >> 好站推荐 这个栏目,你只要做如下更改:
来源网址:[url]http://www.chinaz.com/Webmaster/RecSite/Index.html[/url]
文章网址需包含:/RecSite/0
其他的不需要更改!

==================采集规则=================
{!-- 节点基本信息 --}

{dede:item name='搜索引擎'
        imgurl='/upimg' imgdir='../upimg' language='gb2312'
        isref='no' refurl='' exptime='10'
        typeid='1' matchtype='string'}
{/dede:item}

{!-- 采集列表获取规则 --}

{dede:list source='var' sourcetype='list' 
           varstart='' varend=''}
  {dede:url value='http://www.chinaz.com/Webbiz/Seo/Index.html'}{/dede:url}        
  {dede:need}/Seo/0{/dede:need}
  {dede:cannot}{/dede:cannot}
  {dede:linkarea}

[var:区域]var contents = document.getElementsByClassName('list_news_content');{/dede:linkarea}
{/dede:list}

{!-- 网页内容获取规则 --}

{dede:art}
{dede:sppage sptype='next'}1[var:分页区域]4{/dede:sppage}

  {dede:note field='dede_archives.title' value='[var:内容]' comment='文章标题'
   isunit='' isdown=''}

    {dede:match}

[var:内容]

{/dede:match}

    {dede:function}{/dede:function}

  {/dede:note}

  {dede:note field='dede_addonarticle.body' value='[var:内容]' comment='文章内容'
   isunit='1' isdown='1'}

    {dede:match}
[var:内容]
{/dede:match}
        {dede:trim}
(.*)
{/dede:trim}
{dede:trim}CHINAZ{/dede:trim}
{dede:function}{/dede:function}

{/dede:note}

{dede:note field='dede_archives.writer' value='[var:content]' comment='Article author'
isunit='' isdown=''}

{dede :match}: [var:content]| When{/dede:match}
                                                                                                                          :trim}{/dede:trim}

{dede:function}{/dede:function}

{/dede:note}

{ dede:note field='dede_archives.source' value='[var:content]' comment='article source'
isunit='' isdown=''}

{dede:match}Source: [var:content] | Make{/dede:match}
{dede:trim}]*)>{/dede:trim}
{dede:trim}< /a>{/dede:trim}

{dede:function}{/dede:function}

{/dede:note}

{dede:note field= 'dede_archives.pubdate' value='[var:content]' comment='Publish time'
isunit='' isdown=''}

{dede:match}{/dede:match}

{dede:function}if(@me!="") @me = GetMkTime(@me);
else @me = time();{/dede:function}

{/dede:note}

{dede:note field='dede_archives.sortrank' value='[var:content]' comment='sort level'
isunit='' isdown='' }

{dede:match}{/dede:match}

{dede:function}@me = time();{/dede:function}

{/ dede:note}

{dede:note field='dede_archives.litpic' value='[var:content]' comment='thumbnail'
isunit='' isdown=''}

{dede:match}{/dede:match}

{dede:function}@me = @litpic;{/dede:function}

{/dede:note}

{dede:note field='dede_archives.senddate' value='[var:content]' comment='Entry time'
isunit='' isdown=''}

{dede:match}{/dede:match}

{dede:function}@me = time();{/dede:function}

{/dede:note}
{/dede:art}

http://www.bkjia.com/PHPjc/318318.htmlwww.bkjia.comtruehttp: //www.bkjia.com/PHPjc/318318.htmlTechArticlePlease indicate the source of the reprint is from Laochao im286.com, the address of this post: http://www.im286.com/ viewthread.php?tid=1991813 is only two points away from falling behind. I would like to present the collection rules of ForDede4.0 of the Chinese webmaster station. I hope...
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn