读取网页二行内容,保存在文件中ini或txt中,要读取200多个这样的网页,请高手帮忙
本帖最后由 coolybin 于 2012-8-14 14:46 编辑读取网页二行内容,保存在文件中ini或txt中,要读取200多个这样的网页,请高手帮忙啊
网页是会计财政网的
http://202.109.244.108:8001/website/applicationds/cy_ksinfo/print_newzkz.jsp?txtdlname=!!!!!!!!!&ifds=2
这个网址下去直接显示个人信息(!!!!!!!!!这里是200多个身证号码,每一个号码中要读取二行文字 这二行是前面是固定的,一个是考证号,和考试时间。)
将这二行保存在一文本文件或ini文件都行。找了一上午实在找不出来,所以求助大家。先谢谢大家了。<body>
<form id="frm" name="frm" method="post" action="">
<div align=center class=noprint id=explain><font color=red><input type=button name=button_print value="打印" onclick="cyprint();"> 请使用A4纸打印!<input type=button name=button_close value="关闭" onclick="javascript:window.close()"></font></div>
<br>
<table width="620" align=center border=0 class=tab1 >
<tr><td>
<table width="600" align=center border=0 >
<tr>
<td align="left" height="20" colspan="3" >
<span style="font-size: 10.5pt; font-family: 宋体; color: black">
报名序号:000220120712052721</span></td>
</tr>
<tr>
<td align="center" height="30" colspan="3" ><b>
<font face="宋体" style="font-size:25px;color:#000000;font-weight:800;">准 考 证</font></b></td>
</tr>
<tr>
<td align="center" height="25" colspan="3" >
<span style="font-size:14px; font-family: 宋体; color: black">
厦门市会计从业资格无纸化考试</span></td>
</tr>
<tr>
<td align="left" height="25" width="91" class="td1">姓 名:</td>
<td align="left" height="25" width="369" class="td1">田燕燕</td>
<td align="left" rowspan=6 width="127">
<img src="/images/attachment/ks/2012/07/12/350481198402293511.JPG"width="90" height="110"></td>
</tr>
<tr>
<td align="left" height="25" width="91" class="td1">准考证号:</td>
<td align="left" height="25" width="369" class="td1">120030201555772</td>
</tr>
<tr>
<td align="left" height="25" width="91" class="td1">证件号码:</td>
<td align="left" height="25" width="369" class="td1">350481198402000528</td>
</tr>
<tr>
<td align="left" height="25" width="91" class="td1">考点名称:</td>
<td align="left" height="25" width="369" class="td1">厦门市中华会计函授学校</td>
</tr>
<tr>
<td align="left" height="25" width="91" class="td1">考点地址:</td>
<td align="left" height="25" width="369" class="td1">厦门市故宫路98号
</td>
</tr>
<tr>
<td align="left" height="25" width="91" class="td1">场次时间:</td>
<td align="left" height="25" width="369" class="td1">2012-09-20 14:30:00.0至2012-09-20 17:30:00.0
</td>
</tr>
</table>
准考证号:
场次时间:
读取这二个保存,纠结,还在奋斗中 <body>
<form id="frm" name="frm" method="post" action="">
<div align=center class=noprint id=explain><font color=red><input type=button name=button_print value="打印" onclick="cyprint();"> 请使用A4纸打印!<input type=button name=button_close value="关闭" onclick="javascript:window.close()"></font></div>
<br>
<table width="620" align=center border=0 class=tab1 >
<tr><td>
<table width="600" align=center border=0 >
<tr>
<td align="left" height="20" colspan="3" >
<span style="font-size: 10.5pt; font-family: 宋体; color: black">
报名序号:000220120712052721</span></td>
</tr>
<tr>
<td align="center" height="30" colspan="3" ><b>
<font face="宋体" style="font-size:25px;color:#000000;font-weight:800;">准 考 证</font></b></td>
</tr>
<tr>
<td align="center" height="25" colspan="3" >
<span style="font-size:14px; font-family: 宋体; color: black">
厦门市会计从业资格无纸化考试</span></td>
</tr>
<tr>
<td align="left" height="25" width="91" class="td1">姓 名:</td>
<td align="left" height="25" width="369" class="td1">姓名</td>
<td align="left" rowspan=6 width="127">
<img src="/images/attachment/ks/2012/07/12/350481198402293.JPG"width="90" height="110"></td>
</tr>
<tr>
<td align="left" height="25" width="91" class="td1">准考证号:</td>
<td align="left" height="25" width="369" class="td1">准考证号在这里</td>
</tr>
<tr>
<td align="left" height="25" width="91" class="td1">证件号码:</td>
<td align="left" height="25" width="369" class="td1">证件号码在这里</td>
</tr>
<tr>
<td align="left" height="25" width="91" class="td1">考点名称:</td>
<td align="left" height="25" width="369" class="td1">厦门市中华会计函授学校</td>
</tr>
<tr>
<td align="left" height="25" width="91" class="td1">考点地址:</td>
<td align="left" height="25" width="369" class="td1">厦门市故宫路98号
</td>
</tr>
<tr>
<td align="left" height="25" width="91" class="td1">场次时间:</td>
<td align="left" height="25" width="369" class="td1">2012-09-20 14:30:00.0至2012-09-20 17:30:00.0
</td>
</tr>
</table>
要
准考证号:
场次时间:
保存下来就好。
纠结,奋斗中。。 <body>
<form id="frm" name="frm" method="post" action="">
<div align=center class=noprint id=explain><font color=red><input type=button name=button_print value="打印" onclick="cyprint();"> 请使用A4纸打印!<input type=button name=button_close value="关闭" onclick="javascript:window.close()"></font></div>
<br>
<table width="620" align=center border=0 class=tab1 >
<tr><td>
<table width="600" align=center border=0 >
<tr>
<td align="left" height="20" colspan="3" >
<span style="font-size: 10.5pt; font-family: 宋体; color: black">
报名序号:000220120712052721</span></td>
</tr>
<tr>
<td align="center" height="30" colspan="3" ><b>
<font face="宋体" style="font-size:25px;color:#000000;font-weight:800;">准 考 证</font></b></td>
</tr>
<tr>
<td align="center" height="25" colspan="3" >
<span style="font-size:14px; font-family: 宋体; color: black">
厦门市会计从业资格无纸化考试</span></td>
</tr>
<tr>
<td align="left" height="25" width="91" class="td1">姓 名:</td>
<td align="left" height="25" width="369" class="td1">田燕燕</td>
<td align="left" rowspan=6 width="127">
<img src="/images/attachment/ks/2012/07/12/350481198402293511.JPG"width="90" height="110"></td>
</tr>
<tr>
<td align="left" height="25" width="91" class="td1">准考证号:</td>
<td align="left" height="25" width="369" class="td1">120030201555772</td>
</tr>
<tr>
<td align="left" height="25" width="91" class="td1">证件号码:</td>
<td align="left" height="25" width="369" class="td1">350481198402000528</td>
</tr>
<tr>
<td align="left" height="25" width="91" class="td1">考点名称:</td>
<td align="left" height="25" width="369" class="td1">厦门市中华会计函授学校</td>
</tr>
<tr>
<td align="left" height="25" width="91" class="td1">考点地址:</td>
<td align="left" height="25" width="369" class="td1">厦门市故宫路98号
</td>
</tr>
<tr>
<td align="left" height="25" width="91" class="td1">场次时间:</td>
<td align="left" height="25" width="369" class="td1">2012-09-20 14:30:00.0至2012-09-20 17:30:00.0
</td>
</tr>
</table>
准考证号:
场次时间:
读取这二个保存,纠结,还在奋斗中 $bookTextm = StringRegExp($str, '(?s)证件号码:</td> <td align="left" height="25" width="369" class="td1">(.+?)<br /></div>', 3) ;取证件号码 好像可以实现。以前看过。采集数据嘛 用正则来实现
页:
[1]