Page 2 of 2

Re: Proxomitron过滤之 Step By Step 教程

Posted: Mar 25 2010, 14:28
by Bonnie
网页里的实际源代码是

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()"

Re: Proxomitron过滤之 Step By Step 教程

Posted: Mar 25 2010, 14:52
by bayoso
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...的规则,再增加了这条规则。结果没有用,我把里面所有的规则删除了只留下这条规则,也是不起作用。真是郁闷。

Re: Proxomitron过滤之 Step By Step 教程

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

Re: Proxomitron过滤之 Step By Step 教程

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

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

Re: Proxomitron过滤之 Step By Step 教程

Posted: Mar 25 2010, 19:49
by bayoso
其实我不同这些规则的编写,比如“+”这个干什么的,我不知道,请问有没有什么讲规则的文章。

Re: Proxomitron过滤之 Step By Step 教程

Posted: Mar 25 2010, 20:16
by i11
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
或者看程序自带的英文帮助文件

Re: Proxomitron过滤之 Step By Step 教程

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

Re: Proxomitron过滤之 Step By Step 教程

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

Re: Proxomitron过滤之 Step By Step 教程

Posted: Mar 26 2010, 12:38
by Bonnie
误杀用IncludeExclude-U排除。具体参考IncludeExclude-U里的讲解。
关闭replace blank/new这条规则可以恢复链接的打开方式。

Re: Proxomitron过滤之 Step By Step 教程

Posted: Mar 26 2010, 13:13
by ddbb
要用sidki你要学会用debug还有看log