本帖最后由 yiruirui 于 2010-12-4 11:13 编辑
举例:
http://www.game333.net/game/CSS.htm
从这个网页中读取它的源文件,用 InetRead就OK,从读到的内容中截取一段内容:
截取结果是这样:<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<script src="/js/webThunderDetect.js"></script>
<script src="/js/base64.js"></script>
<script language="javascript">
var thunderArr = new Array;
thunderArr['9'] = "http://9.game333.net/CSS.exe";
thunderArr['8'] = "http://8.game333.net/CSS.exe";
thunderArr['5'] = "http://5.game333.net/CSS.exe";
thunderArr['10'] = "http://10.game333.net/CSS.exe";
var thunder_pid = "19985";
var thunder_type = "08";
var restitle = "WEB迅雷下载";
</script>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td colspan="2">
<span class="fb downid2">CS:S 起源僵尸服 下载地址</span></td>
</tr>
<tr>
<td width="70"> </td>
<td><div class="bt-down">
<h3><a href="/bt/CSS.exe.torrent" onclick="getCnt();" rel="nofollow">[<b>CS:S 起源僵尸服</b>]CSS.exe.torrent </a><span style="color: #ccc;">(110KB)</span></h3></div></td>
</tr>
</table></td>
</tr>
</table>
刚好在<table>与</table>之间的内容,麻烦新手老手高手菜鸟都动手练习一下吧!
PS:可以用大A版主的正则测试工具进行测试,注意一点通用性就OK! |