Page 1 of 1

又遇到一个难题

Posted: Apr 04 2010, 04:20
by liumailong
我研究这个问题已经3天了,实际花费的时间也超过12个小时了。
还是无法解决,只能求大家帮忙了。
网址链接
要过滤的就是那些发亮的字
2010-04-04_04_24_24_000.png
2010-04-04_04_24_24_000.png (92.99 KiB) Viewed 6626 times

Re: 又遇到一个难题

Posted: Apr 04 2010, 04:43
by Bonnie
屏蔽

Code: Select all

www.qidian.com/Javascript/ReadChapter.js
这个js。不过屏蔽后似乎显示有点不一样,要精准过滤的话可以过滤js里的AddUrl这个函数。

另外你似乎常用的是IE吧,用IE分析想要过滤的元素会比较困难,推荐用firefox+firebug,分析起来很方便。

Re: 又遇到一个难题

Posted: Apr 04 2010, 05:26
by liumailong
Bonnie 你没有看清问题的本质
代码里有一段是

Code: Select all

<script type="text/javascript">
//<![CDATA[
var keywords={ list:[
{key:"传说",link:"show.aspx?url=http://in.wx.kunlun.com/?u=489%26u2=wndj",img:"http://cj.qidian.com/Picture/20100316_12.jpg"},
{key:"穿越",link:"show.aspx?url=http://in.wx.kunlun.com/?u=489%26u2=wndj",img:"http://cj.qidian.com/Picture/20100316_11.jpg"},
{key:"武侠",link:"show.aspx?url=http://in.wx.kunlun.com/?u=489%26u2=wndj",img:"http://cj.qidian.com/Picture/20100316_11.jpg"},
{key:"游戏",link:"show.aspx?url=http://in.wx.kunlun.com/?u=489%26u2=wndj",img:"http://cj.qidian.com/Picture/20100316_11.jpg"},
{key:"传奇",link:"http://cj.qidian.com/svnad/other/ctrip/20091231/",img:"http://cj.qidian.com/Picture/20091231_34.jpg"},
{key:"历史",link:"http://cj.qidian.com/svnad/other/ctrip/20091231/",img:"http://cj.qidian.com/Picture/20091231_203504336.jpg"},
{key:"快乐",link:"http://",img:"http://cj.qidian.com/Picture/20091231_203519680.jpg"},
]};
//]]>
</script>
应该想办法过滤它才对!我就是没办法在不误杀的情况下过滤它才来求助的。

PS:我很明显是用的firefox吧..............

Re: 又遇到一个难题

Posted: Apr 04 2010, 05:33
by i11
如果不想大改的话,我会这样写,把var keyword部分注释掉,用opera的userjs可以达到相同效果:

Code: Select all

[Patterns]
Name = "temp"
Active = TRUE
URL = "*"
Limit = 12
Match = "var keywords"
Replace = "//"
当然你也可以完全把整个script过滤掉,用$NEST加上适当匹配,比如

Code: Select all

$NEST(<script[^{]++var keywords,</script>)
这样可能会比较影响整体过滤的效率

Re: 又遇到一个难题

Posted: Apr 04 2010, 06:05
by liumailong
$NEST还能这样用!
唉,看来我还是太嫩了。
十分感谢你 i11