Dede3.1 detailed description of paging text collection and filtering rules (Graphic tutorial) Part 4

Source: Internet
Author: User

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:Copy codeThe Code is as follows: {dede: trim} <td align = 'center' height = '30'> (. *) page count {/dede: trim}

Collect:


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 ):


Write a complete paging filter rule:Copy codeThe Code is as follows: {dede: trim} <td align = 'center' height = '30'> (. *) </option> </select> </td> {/dede: trim}

Collect the data and see the result:

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:Copy codeThe 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'} <td align = 'center' height = '30'> times on the homepage [var: Paging area] Page {/dede: sppage}

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

{Dede: match} <title> [var: content] -- Tianshui search </title> {/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} </TR>
<TR>
<TD height = "8"> </TD>
</TR>
<TR>
<TD valign = "top" class = Connet> <p> [var: content] </p>
</TD>
</TR> {/dede: match}
{Dede: trim} <td align = 'center' height = '30'> (. *) </option> </select> </td> {/dede: trim}
{Dede: trim}
{/Dede: trim}
{Dede: trim} <param ([^>] *) >{/ dede: trim}
{Dede: trim} <embed ([^>] *)> ([^>] *) </embed> {/dede: trim}
{Dede: trim} <embed ([^>] *) >{/ dede: trim}
{Dede: trim} </embed >{/ dede: trim}
{Dede: trim} <object ([^>] *)> ([^>] *) </object> {/dede: trim}
{Dede: trim} <object ([^>] *) >{/ dede: trim}
{Dede: trim} </object> {/dede: trim}
{Dede: trim} <OBJECT ([^>] *)> ([^>] *) </OBJECT> {/dede: trim}
{Dede: trim} <OBJECT ([^>] *) >{/ dede: trim}
{Dede: trim} </OBJECT> {/dede: trim}
{Dede: trim} <iframe ([^>] *)> ([^>] *) </iframe >{/ dede: trim}
{Dede: trim} <iframe ([^>] *) >{/ dede: trim}
{Dede: trim} </iframe >{/ dede: trim}
{Dede: trim} <IFRAME ([^>] *)> ([^>] *) </IFRAME >{/ dede: trim}
{Dede: trim} <IFRAME ([^>] *) >{/ dede: trim}
{Dede: trim} </IFRAME >{/ dede: trim}
{Dede: trim} <font ([^>] *)> ([^ <] *) </font> {/dede: trim}
{Dede: trim} <font ([^>] *) >{/ dede: trim}
{Dede: trim} </font> {/dede: trim}
{Dede: trim} ] *) >{/ dede: trim}
{Dede: trim} <a ([^>] *)> ([^ <] *) </a> {/dede: trim}
{Dede: trim} <a ([^>] *) >{/ dede: trim}
{Dede: trim} </a> {/dede: trim}
{Dede: trim} <td ([^>] *)> ([^>] *) </td> {/dede: trim}
{Dede: trim} <td ([^>] *) >{/ dede: trim}
{Dede: trim} </td> {/dede: trim}
{Dede: trim} <tr ([^>] *)> ([^>] *) </tr> {/dede: trim}
{Dede: trim} <tr ([^>] *) >{/ dede: trim}
{Dede: trim} </tr> {/dede: trim}
{Dede: trim} <tbody ([^>] *)> ([^>] *) </tbody> {/dede: trim}
{Dede: trim} <tbody >{/ dede: trim}
{Dede: trim} </tbody> {/dede: trim}
{Dede: trim} <table ([^>] *)> ([^>] *) </table> {/dede: trim}
{Dede: trim} <table ([^>] *) >{/ dede: trim}
{Dede: trim} </table> {/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}

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.