Proxomitron过滤之 Step By Step 教程

新手入门、经验交流

Moderator: cre

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

Re: Proxomitron过滤之 Step By Step 教程

Post by Bonnie » Mar 25 2010, 14:28

网页里的实际源代码是

Code: Select all

<div class="topads">
你的规则少了个s,另外我再测试了下,字节数变成16500多了。可能是sina每次生成页面时会随机给出代码导致字节数和div的class有变化。
你的规则并不会很影响执行效率,不过有些习惯最好改掉。
一是URL match尽量精确,少用不该用的通配符;
二是对于只匹配一次的规则尽量使用$STOP()。
三是过滤字节过大的规则尽量用$NEST()保证匹配正确的结束标签,防止出错。
帮你写了一个,你可以试用看看。

Code: Select all

[Patterns]
Name = "Remove Sina Top Ads"
Active = TRUE
URL = "[^.]+.sina.com.cn/"
Bounds = "$NEST(<div,</div>)"
Limit = 17000
Match = "<div class="topads+">*"
        "$STOP()"

bayoso
Posts: 8
Joined: Mar 12 2009, 14:05

Re: Proxomitron过滤之 Step By Step 教程

Post by bayoso » Mar 25 2010, 14:52

Bonnie wrote:网页里的实际源代码是

Code: Select all

<div class="topads">
你的规则少了个s,另外我再测试了下,字节数变成16500多了。可能是sina每次生成页面时会随机给出代码导致字节数和div的class有变化。
你的规则并不会很影响执行效率,不过有些习惯最好改掉。
一是URL match尽量精确,少用不该用的通配符;
二是对于只匹配一次的规则尽量使用$STOP()。
三是过滤字节过大的规则尽量用$NEST()保证匹配正确的结束标签,防止出错。
帮你写了一个,你可以试用看看。

Code: Select all

[Patterns]
Name = "Remove Sina Top Ads"
Active = TRUE
URL = "[^.]+.sina.com.cn/"
Bounds = "$NEST(<div,</div>)"
Limit = 17000
Match = "<div class="topads+">*"
        "$STOP()"
我实在是找不到原因,用你的规则后还是不起效果,我感觉我开pro跟没开差不多,我下载的是4.5美化版,载入里面已经有的07...的规则,再增加了这条规则。结果没有用,我把里面所有的规则删除了只留下这条规则,也是不起作用。真是郁闷。

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

Re: Proxomitron过滤之 Step By Step 教程

Post by phoenix » Mar 25 2010, 15:20

bayoso wrote:我实在是找不到原因,用你的规则后还是不起效果,我感觉我开pro跟没开差不多
浏览器里有把Proxomitron设置为代理了吗?

bayoso
Posts: 8
Joined: Mar 12 2009, 14:05

Re: Proxomitron过滤之 Step By Step 教程

Post by bayoso » Mar 25 2010, 16:02

phoenix wrote:
bayoso wrote:我实在是找不到原因,用你的规则后还是不起效果,我感觉我开pro跟没开差不多
浏览器里有把Proxomitron设置为代理了吗?
我是新手,代理应该怎么设置。

刚才搜索到了,谢谢提醒。

bayoso
Posts: 8
Joined: Mar 12 2009, 14:05

Re: Proxomitron过滤之 Step By Step 教程

Post by bayoso » Mar 25 2010, 19:49

其实我不同这些规则的编写,比如“+”这个干什么的,我不知道,请问有没有什么讲规则的文章。

i11
Posts: 11
Joined: Feb 25 2009, 00:06

Re: Proxomitron过滤之 Step By Step 教程

Post by i11 » Mar 25 2010, 20:16

bayoso wrote:其实我不同这些规则的编写,比如“+”这个干什么的,我不知道,请问有没有什么讲规则的文章。
加号是用来匹配的,帮助文件里面这样描述的:
+ The plus sign indicates a run of repeating characters. For instance, "a+" would match "a", "aa", or "aaaa". You can use it after other meta characters or parenthesis for more complex runs. For example...

[abc]+ would match a run of any characters "a","b",or "c" like "ababccba"

([a-z]&[^n])+ would match a run of letters "a" through "z" but not "n"

(foo)+ would match "foo", "foofoo", "foofoofoo", etc.

An important point to make about + is that it's a "blind" run. This means it repeats at long as the condition it's testing is true regardless of anything the follows it! For example "(foo)+foobar" could never match. Why? well the loop will eat up all the "foo's" their are leaving no "foo" for "foobar"! This can actually be very useful sometimes, but if it's not what you want try "++" instead.
论坛里面有人翻译过中文的,这样描述的:
+ 加号表示连续重复的字符。例如:"a+" 可匹配 "a", "aa"以及 "aaaa"。复杂一点的如:
【The plus sign indicates a run of repeating characters. For instance, "a+" would match "a", "aa", or "aaaa". You can use it after other meta characters or parenthesis for more complex runs. For example...】

[abc]+ 可以匹配 "a","b"以及 "c" 诸如 "ababccba"这样

([a-z]&[^n])+ 可以匹配"a"到 "z"的任意字母但除了 "n"

(foo)+ 匹配"foo", "foofoo", "foofoofoo"等等

An important point to make about + is that it's a "blind" run. This means it repeats at long as the condition it's testing is true regardless of anything the follows it! For example "(foo)+foobar" could never match. Why? well the loop will eat up all the "foo's" their are leaving no "foo" for "foobar"! This can actually be very useful sometimes, but if it's not what you want try "++" instead.

如果你偏好中文的话,可以看别人翻好的一部分帮助文件:
http://forum.proxomitron.cn/viewtopic.php?f=2&t=103
或者看程序自带的英文帮助文件

Bonnie
Moderator
Posts: 165
Joined: Oct 05 2008, 01:27

Re: Proxomitron过滤之 Step By Step 教程

Post by Bonnie » Mar 25 2010, 21:38

bayoso wrote: 我是新手,代理应该怎么设置。
这个在网上搜索一下就有很多教程了。IE的话是在Internet选项里设置。
bayoso wrote:请问有没有什么讲规则的文章。
proxomitron自带的帮助文件就是讲规则的文章。如果看不懂英文的话,置顶有翻译过的中文版。

bayoso
Posts: 8
Joined: Mar 12 2009, 14:05

Re: Proxomitron过滤之 Step By Step 教程

Post by bayoso » Mar 26 2010, 08:17

谢谢各位老大,现在简单的规则,能写点了。不过,我现在直接套用sidki的规则,发现有些误杀,还有不喜欢链接在当前打开,请问应该怎么去修改。

Bonnie
Moderator
Posts: 165
Joined: Oct 05 2008, 01:27

Re: Proxomitron过滤之 Step By Step 教程

Post by Bonnie » Mar 26 2010, 12:38

误杀用IncludeExclude-U排除。具体参考IncludeExclude-U里的讲解。
关闭replace blank/new这条规则可以恢复链接的打开方式。

ddbb
Moderator
Posts: 425
Joined: Jan 07 2008, 13:30

Re: Proxomitron过滤之 Step By Step 教程

Post by ddbb » Mar 26 2010, 13:13

要用sidki你要学会用debug还有看log

Post Reply