首页 新闻 会员 周边

网页中的缀余信息如何才能过滤啊?非常感谢!!!

0
悬赏园豆:10 [已关闭问题] 关闭于 2008-07-09 20:07
<P><STRONG><FONT color=#000080 size=2>我现在想通过一种算法,实现去除网页中的广告</FONT></STRONG></P> <P><STRONG><FONT color=#000080 size=2>等一些缀余信息,还过滤掉那些不重要的东西。</FONT></STRONG></P> <P><FONT size=2><STRONG><FONT color=#000080>我只要提取正文标题</FONT></STRONG><STRONG><FONT color=#000080>和内容,提取后下载到本地,而不用去浏览网页,这样能实现吗?</FONT></STRONG></FONT></P> <P><STRONG><FONT color=#000080 size=2>请高手指教下,谢谢啦!</FONT></STRONG></P> <P><STRONG><FONT color=#000080 size=2>若能有具体的算法,或是实例,那更是感激不尽了!</FONT></STRONG></P> <P><STRONG><FONT color=#000080><FONT size=2>我的邮箱是:</FONT><A href="mailto:527302149@qq.com"><FONT size=2>527302149@qq.com</FONT></A></FONT></STRONG></P> <P><FONT size=2><STRONG>现在急用!!!!!!</STRONG></FONT></P> <P><STRONG><FONT color=#000080 size=3></FONT></STRONG>&nbsp;</P>
问题补充: 我想用正则表达式把下面: 在<tilte></tiltle><p></p> 里面的内容过滤出来 请问高手怎么用C#编写代码啊? 谢谢了, 急用!!!!!!!!!! <!--[1,1,15900928] published at 2008-07-09 14:32:08 from #194 by 2674--> <!--北京晚报--> <!----> <html> <head> <meta http-equiv="Content-type" content="text/html; charset=gb2312"> <title>奥运纪念钞20分钟抢兑一空_新闻中心_新浪网</title> <meta name=keywords content="奥运纪念钞20分钟抢兑一空"> <meta name=description content="奥运纪念钞20分钟抢兑一空"> <meta name="stencil" content="PGLS000115"> <meta name="publishid" content="1,1,15900928"> <meta name="subjectid" content="1,63,3622"> <link rel="alternate" type="application/rss+xml" title="新浪新闻中心_国内新闻" href="http://rss.sina.com.cn/news/china/focus15.xml" /> <script type="text/javascript" src="http://i3.sinaimg.cn/home/sinaflash.js"></script> <style type="text/css"> /* 通用 */ *{margin:0;padding:0;} body {background: #FFF;color:#000;margin:0;text-align:center;} td,div{font-size:12px;} ul,li{list-style:none;} ul,p,ol{line-height:20px;} select,input{vertical-align:middle;} img{border:0;} .f14 {font-size:14px;} .lh20 {line-height:20px;} .b1{border:1px #fcc solid;} a{text-decoration: underline;color: #009} /*a:visited{color:#800080;}*/ a:hover{color: #f00;} .f14links{line-height:23px;} .f14links,.f14links a{font-size:14px;color:#009;} .f14links a:hover{color:#F00;} .f14links li{padding-left:13px;background:url(http://i0.sinaimg.cn/dy/legal/2006index/news_law_hz_012.gif) no-repeat 3px 45%;} .clearit{clear:both;font-size:0;line-height:0;height:0;} #wrap{width:950px; overflow:hidden; margin:0 auto;background:#FFF;text-align:left;} .split{font-size:0;line-height:0;clear:both;height:6px;} .lsplit{font-size:0;line-height:0;clear:both
刘皇叔的主页 刘皇叔 | 初学一级 | 园豆:120
提问于:2008-07-08 21:04
< >
分享
所有回答(2)
0
你已经发过一次这个问题了,就是用正则表达式提取;如果不会正则表达式就用心学学。
玉开 | 园豆:8822 (大侠五级) | 2008-07-09 08:40
0
其实你只是要标题和内容,那就分析对方的HTML,然后用正则,甚至indexOf都可以找出标题和内容的位置,用正则或substring都可以把你想要的东西提取出来
丁学 | 园豆:18730 (专家六级) | 2008-07-09 13:33
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册