广告过滤求教!

新手入门、经验交流

Moderator: cre

Forum rules
  • 软件自带帮助是最好的入门教程,请仔细阅读;在您掌握最基本知识前,我们没法帮助您
  • 提问前请先查阅软件帮助文件和论坛相关讨论
  • 查阅软件帮助和论坛相关讨论即可解决的问题帖将直接删除,以免浪费他人时间
  • 请学会如何提问,尽量将问题描述清楚,不明确的提问将被直接删除
Post Reply
kuke666
Posts: 4
Joined: Sep 14 2009, 01:44

广告过滤求教!

Post by kuke666 » Sep 14 2009, 20:28

小弟新手,刚学习,求教Ing~~~
刚学习了DDBB的 http://forum.proxomitron.cn/viewtopic.php?f=2&t=80
按照方式过滤,遇到难题~
过滤一个小说站广告~ http://www.94feifan.com/files/article/h ... 76901.html

Code: Select all

<div align="center">
  <table width="770" border="0" cellspacing="0" cellpadding="0" align="center">
    <tr>
      <td><fieldset style='width:250;height:265;border:1px dashed #a6ccf9'><legend style="background-color:#e4ebf1;"><font color=blue style="font-style: normal; font-variant: normal; font-weight: normal; line-height: 160%; font-size: 12px; text-decoration: none"><font color=red>第一视频</font>[此广告位招租,QQ:232698199]</font></legend><SCRIPT 
src="http://busjs.vodone.cn/bus/ownerjs/advjs_37/37079/37079_41851_p7_.js"></SCRIPT></td>
      <td><fieldset style='width:250;height:260;border:1px dashed #a6ccf9'><legend style="background-color:#e4ebf1;"><font color=blue style="font-style: normal; font-variant: normal; font-weight: normal; line-height: 160%; font-size: 12px; text-decoration: none"><font color=red>广告②</font>[此广告位招租,QQ:232698199]</font></legend><SPAN id=adbanner_2> </SPAN></td>
      <td><fieldset style='width:250;height:260;border:1px dashed #a6ccf9'><legend style="background-color:#e4ebf1;"><font color=blue style="font-style: normal; font-variant: normal; font-weight: normal; line-height: 160%; font-size: 12px; text-decoration: none"><font color=red>广告③</font>[此广告位招租,QQ:232698199]</font></legend><SPAN id=adbanner_3> </SPAN></td>
    </tr>
  </table>
  <table width="760" border="0" cellspacing="0" cellpadding="0" align="center">
    <tr>
      <td><fieldset style='width:760;height:100;border:1px dashed #a6ccf9'><legend style="background-color:#e4ebf1;"><font color=blue style="font-style: normal; font-variant: normal; font-weight: normal; line-height: 160%; font-size: 12px; text-decoration: none"><font color=red>广告④</font>[此广告位招租,QQ:232698199]</font></legend><SPAN id=adbanner_4> </SPAN></td>
<div align="center"><script type="text/javascript" src="http://www.94feifan.com/gg/gonggao.js"></script></div>
以上是需要过滤内容部分的源代码~像这种该使用哪种方式过滤呢??
望高手告诉方法~~

User avatar
cre
Moderator
Posts: 91
Joined: May 26 2009, 00:34

Re: 广告过滤求教!

Post by cre » Sep 14 2009, 20:57

<table width="770" border="0" cellspacing="0" cellpadding="0" align="center">
因为没有height,所以不用管它。

我觉得应该用

Code: Select all

[Patterns]
Name = "Fieldset"
Active = TRUE
Bounds = "$NEST(<fieldset*,</(legend|fieldset)>)"
Limit = 2000
Match = "*(*1px dashed*) & (*(#a6ccf9|#ff9966)*)*"
因为经常见这个东东,而且前后次序还不一定一样。

kuke666
Posts: 4
Joined: Sep 14 2009, 01:44

Re: 广告过滤求教!

Post by kuke666 » Sep 14 2009, 21:08

why 的方式对我这种新手来说貌似太高深了~~不过真的很感谢~~

内容里因为没有重复的<div align="center"> 所以DDBB的那个方式就很适合我啦~~~ :lol: :lol:

Code: Select all

[Patterns]
Name = "94feifan"
Active = TRUE
URL = "$TYPE(htm)www.94feifan.com/files/article/html/*"
Limit = 1900
Match = "<div align="center">*</div>"
Replace = "<!-- 94feifan -->"

User avatar
cre
Moderator
Posts: 91
Joined: May 26 2009, 00:34

Re: 广告过滤求教!

Post by cre » Sep 14 2009, 21:16

<div align="center">当然可以了,只需要加个$URL()就行了。可以在match,也可以在$LST()。
不过除了在url,其他地方最好前面加个\w。

kuke666
Posts: 4
Joined: Sep 14 2009, 01:44

Re: 广告过滤求教!

Post by kuke666 » Sep 14 2009, 21:20

其他前面加个\w ?
这个是什么意思呢?

加在哪?MATCHE里??

User avatar
cre
Moderator
Posts: 91
Joined: May 26 2009, 00:34

Re: 广告过滤求教!

Post by cre » Sep 14 2009, 21:28

我是说的这个。。。

这是可以的。

Code: Select all

[Patterns]
Name = "baidu"
Active = TRUE
URL = "www.baidu.com"
Limit = 256
Match = "\1高级"
Replace = "\1低级"
这是不行的。

Code: Select all

[Patterns]
Name = "baidu"
Active = TRUE
Limit = 256
Match = "$URL(www.baidu.com)\1高级"
Replace = "\1低级"
[/color]

这样就行了。

Code: Select all

[Patterns]
Name = "baidu"
Active = TRUE
Limit = 256
Match = "$URL(\wbaidu.com)\1高级"
Replace = "\1低级"

kuke666
Posts: 4
Joined: Sep 14 2009, 01:44

Re: 广告过滤求教!

Post by kuke666 » Sep 14 2009, 21:36

哦,原来如此~~

不夜侯
Posts: 101
Joined: Jul 29 2009, 16:22

Re: 广告过滤求教!

Post by 不夜侯 » Sep 14 2009, 21:46

Code: Select all

[Patterns]
Name = "Kill ad table"
Active = TRUE
URL = "$TYPE(htm)"
Bounds = "<table\s*</table>"
Limit = 3500
Match = "*此广告位招租*"
Replace = "<!---- 广告 ---->"


User avatar
phoenix
Site Admin
Posts: 525
Joined: Dec 29 2007, 16:27

Re: 广告过滤求教!

Post by phoenix » Sep 15 2009, 09:49

why wrote: 这样就行了。

Code: Select all

[Patterns]
Name = "baidu"
Active = TRUE
Limit = 256
Match = "$URL(\wbaidu.com)\1高级"
Replace = "\1低级"
这里有个问题,\wbaidu.com 会匹配 iambaidu.com 或 http://www.google.com/baidu.com 这样的 URL。

$URL() 只是要求你把协议部分写上,不如写成 $URL(http://www.baidu.com/)。

Post Reply