Dede3.1 detailed description of paging text collection filtering rules (graphic tutorial) continued 4 _ PHP Tutorial

Source: Internet
Author: User
Dede3.1 detailed description of paging text collection filtering rules (graphic tutorial) continued 4. So far, the page content matching is complete. After the article content matching and paging content matching are completed, only "filtering" is available, including filtering by page area and article content. So far, the page content matching is complete.

After the article content matching and paging content matching are completed, only "filtering" is available, including filtering by page area and article content. According to my own feeling, the above two rules are well written. we only need to find the "uniqueness" code in all links, but the filtering rules are about to survive, endless mysteries ...... Haha, that's how it feels. Especially for beginners like me, I am still confused about the regular expression, and I am looking for some software on the regular expression, according to the gourd plot.

Okay, it's time to gossip. I'm tired too. let's hear about the California Hotel. relax at the California motel 94.

Can you tell at a glance how to write filter rules? I can't tell it at all. No way. new users are new users. Regardless of it, write a rule based on the paging filtering rule of the original example to see the result:

The code is as follows:


{Dede: trim}(. *) Page count {/dede: trim}


Collect:

= 700) window. open ('/upload/200743213556612.gif'); "src =" http://www.bkjia.com/uploads/allimg/131016/06063112Q-0.gif "onload =" if (this. width> '200') this. width = '000000'; "border = 0>
Paging is successful, but there are too many waste codes. you have to change them!
Looking at the redundant code features, it seems that the filtering scope is not enough, and many of the following content should be filtered out. Well, move the filtering area back and directly move it to the red part. (in fact, I changed the filtering rule several times. here I will put it in place once, do not delay your friends ):

= 700) window. open ('/upload/200743213556171.gif'); "src =" http://www.bkjia.com/uploads/allimg/131016/0606314629-1.gif "onload =" if (this. width> '200') this. width = '000000'; "border = 0>
Write a complete paging filter rule:

The code is as follows:


{Dede: trim}(.*){/Dede: trim}


Collect the data and see the result:

= 700) window. open ('/upload/200743213556537.gif'); "src =" http://www.bkjia.com/uploads/allimg/131016/0606314A6-2.gif "onload =" if (this. width> '200') this. width = '000000'; "border = 0>

Okay. the page is successfully paged, and no additional code is available. At this point, all the major code is complete.
The result is as follows:
Paging: analysis of the style of work of Party members and cadres
Non-paging: work plan of the Ministry of literature and art
Write a completed site rule:

The code is as follows:


{! -- Basic node information --}

{Dede: item name = 'tianshui _ work plan _ 1 page'
Imgurl = '/upimg' imgdir = '../upimg' language = 'gb2312 'typeid = '1' macthtype = 'string '}
{/Dede: item}

{! -- Collection list acquisition rules --}

{Dede: list source = 'var' sourcetype = 'list'
Varstart = ''varend = ''}
{Dede: url value = 'http: // www.tiansou.net/html/y_cyfw/r_gzzj/f_gzjh/index.html'#/dede:url}
{Dede: need} gzloud/2007-{/dede: need}
{Dede: cannot} gz.pdf/2007-1 {/dede: cannot}
{Dede: linkarea} [var: Region] {/dede: linkarea}
{/Dede: list}

{! -- Webpage content retrieval rules --}

{Dede: art}
{Dede: sppage sptype = 'full '}[Var: Paging area] Page times on the homepage {/dede: sppage}

{Dede: note field = 'dede _ archives. title' value = '[var: content] 'Comment = 'Article title'
Isunit = ''isdown = ''}

{Dede: match}[Var: content] -- Tianshui search{/Dede: match}

{Dede: function} {/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. write' value = '[var: content] 'Comment = 'author'
Isunit = ''isdown = ''}

{Dede: match} {/dede: match}

{Dede: function} {/dede: function}

{/Dede: note}

{Dede: note field = 'dede _ archives. litpic 'value =' [var: content] 'Comment = 'thumbnails'
Isunit = ''isdown = ''}

{Dede: match} {/dede: match}

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

{/Dede: note}

{Dede: note field = 'dede _ archives. pubdat' value = '[var: content] 'Comment = 'publication 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. senddate' value = '[var: content] 'Comment = 'entry time'
Isunit = ''isdown = ''}

{Dede: match} {/dede: match}

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

{/Dede: note}

{Dede: note field = 'dede _ addonarticle. body' value = '[var: content] 'Comment = 'article content'
Isunit = '1' isdown = '1 '}

{Dede: match}




[Var: content]



{/Dede: match}
{Dede: trim}(.*){/Dede: trim}
{Dede: trim}
{/Dede: trim}
{Dede: trim} ] *)> {/Dede: trim}
{Dede: trim} ] *)> ([^>] *){/Dede: trim}
{Dede: trim} ] *)> {/Dede: trim}
{Dede: trim}{/Dede: trim}
{Dede: trim} ] *)> ([^>] *){/Dede: trim}
{Dede: trim} ] *)> {/Dede: trim}
{Dede: trim}{/Dede: trim}
{Dede: trim} ] *)> ([^>] *){/Dede: trim}
{Dede: trim} ] *)> {/Dede: trim}
{Dede: trim}{/Dede: trim}
{Dede: trim} {/dede: trim}
{Dede: trim} {/dede: trim}
{Dede: trim} {/dede: trim}
{Dede: trim} {/dede: trim}
{Dede: trim}] *)> ([^ <] *) {/dede: trim}
{Dede: trim}] *)> {/dede: trim}
{Dede: trim} {/dede: trim}
{Dede: trim}] *)> {/dede: trim}
{Dede: trim}] *)> ([^ <] *) {/dede: trim}
{Dede: trim}] *)> {/dede: trim}
{Dede: trim} {/dede: trim}
{Dede: trim} ] *)> ([^>] *){/Dede: trim}
{Dede: trim} ] *)> {/Dede: trim}
{Dede: trim}{/Dede: trim}
{Dede: trim} ] *)> ([^>] *){/Dede: trim}
{Dede: trim} ] *)> {/Dede: trim}
{Dede: trim}{/Dede: trim}
{Dede: trim} ] *)> ([^>] *){/Dede: trim}
{Dede: trim}{/Dede: trim}
{Dede: trim}{/Dede: trim}
{Dede: trim} ] *)> ([^>] *){/Dede: trim}
{Dede: trim} ] *)> {/Dede: trim}
{Dede: trim}{/Dede: trim}
{Dede: 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} {/dede: match}

{Dede: function} @ me = 'Internet' {/dede: function}

{/Dede: note}
{/Dede: art}


Bytes. After the article content matching and paging content matching are completed, only "filtering" is available, including filtering by page area and article content. According...

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.