目标网址[1]:
http://www.shian.gov.cn/web/jghq.aspx
里面“批发市场商品价格汇总统计”的内容是 iframe 嵌进去的,想爬里面的菜价。
查看框架源码,发现含有菜价的目标网页[2]是:
www.shian.gov.cn/web/jghq_static.aspx
爬目标网页[2],得到的内容如下。
[问题]里面的菜名、菜价内容完全丢失。这个该怎么处理呀?
<html>
<head>
<title>价格行情</title>
<meta content="zh-cn" http-equiv="Content-Language"/>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type"/>
<link href="indexcss.css" rel="stylesheet" type="text/css"/>
</head>
<body bgcolor="#ffffff" leftmargin="0" topmargin="0">
<br/>
<form action="jghq_static.aspx" id="Form1" method="post">
<input id="__VIEWSTATE" name="__VIEWSTATE" type="hidden" value="/wEPDwUJOTkzMTA4NzM4D2QWAgIBD2QWAgIFD2QWEgIBDzwrAAsBAA8WDB4IUGFnZVNpemUCFB4QQ3VycmVudFBhZ2VJbmRleGYeCERhdGFLZXlzFgAeC18hSXRlbUNvdW50Zh4JUGFnZUNvdW50AgEeFV8hRGF0YVNvdXJjZUl0ZW1Db3VudGZkZAIDDw8WAh4EVGV4dAUBMWRkAgUPDxYCHwYFATFkZAIHDw8WAh8GBQIyMGRkAhUPDxYCHwZlZGQCFg8PFgIfBmVkZAIXDw8WAh8GZWRkAhgPDxYCHwZlZGQCGQ8PFgIfBmVkZGQ54k8xC1bweBsA6y8dJk8MPrrcbeg01u/XNx8eMcBHPA=="/>
<input id="__EVENTVALIDATION" name="__EVENTVALIDATION" type="hidden" value="/wEdAAfRcPnPSVRcgynXhDGg9xqU4kXHexmHTU3XFH1VXAJoLKE9sXUIGLUYn9CF6aOsrFQY207xRgN32GhpklrIeNb1k9q+Dvz5GhUZi/1U8wQNg6SRIWS4Ty/Jk88HkugWH7zcouhQiaDF9I9OFtqm0AqvH7do95Mjb5DMi5nDzW0lYuiIxoUfHaCQbffhBrlC0Nc="/>
<table align="center" border="0" cellpadding="0" cellspacing="0" width="550">
<tr>
<td align="middle" valign="top">
<table align="center" border="0" id="table3" width="100%">
<tr>
<td align="middle" valign="top" width="70%">
<p>
<span id="goodstypename"></span>
批发市场商品价格汇总统计
</p><table border="0" cellpadding="0" cellspacing="0" width="95%">
<tr>
<td align="right" width="5"><img src="images/scgl_89.gif"/></td>
<td align="middle" style="BACKGROUND-POSITION: right bottom; BACKGROUND-IMAGE: url(images/scgl_90.gif); BACKGROUND-REPEAT: repeat-x"><font face="宋体">
<table border="0" cellpadding="0" cellspacing="0" class="unnamed1" id="Table5" width="100%">
<tr>
<td width="50%"> 日期:
<span id="fromdate"></span></td>
<td align="middle" width="50%"><font face="宋体">单位: 元 /公斤</font></td>
</tr>
</table>
</font>
</td>
<td align="left" width="5"><img src="images/scgl_91.gif"/></td>
</tr>
<tr>
<td align="right" background="images/left.gif" width="5"></td>
<td align="middle" valign="top">
<p>
</p><table border="0" cellpadding="0" cellspacing="0" id="Table1" width="100%">
<tr>
<td align="middle"><table cellpadding="3" cellspacing="0" id="PriceStaticControl1_DataGrid1" rules="all" width="100%">
<tr align="center">
<td class="pricet">品种名称</td><td class="pricet">最高价</td><td class="pricet">最低价</td><td class="pricet">平均价</td>
</tr>
</table><p></p>
</td>
</tr>
<tr>
<td align="middle" width="100%">
<table border="0" cellpadding="0" cellspacing="0" id="Table2" width="100%">
<tr>
<td align="middle" class="black"><font face="宋体"> <img alt="" border="0" src="/web/images/multipage_icon.gif"/>
第 </font><font color="red">
<span id="PriceStaticControl1_currentpage">1</span></font><font face="宋体"> 页 /共
</font><font color="red">
<span id="PriceStaticControl1_pagenum">1</span></font><font face="宋体"> 页
</font><font color="red">
<span id="PriceStaticControl1_sizeperpage">20</span></font><font face="宋体"> 条 /页
</font>
<a href="javascript:__doPostBack('PriceStaticControl1$firstpage','')" id="PriceStaticControl1_firstpage">首页</a><font face="宋体">
</font>
<a href="javascript:__doPostBack('PriceStaticControl1$prepage','')" id="PriceStaticControl1_prepage">前页</a><font face="宋体">
</font>
<a href="javascript:__doPostBack('PriceStaticControl1$nextpage','')" id="PriceStaticControl1_nextpage">后页</a><font face="宋体">
</font>
<a href="javascript:__doPostBack('PriceStaticControl1$rearpage','')" id="PriceStaticControl1_rearpage">尾页</a><font face="宋体">
转到第 </font>
<input border="1" id="PriceStaticControl1_pageno" name="PriceStaticControl1:pageno" type="text"/><font face="宋体">页
</font>
<input class="button" id="PriceStaticControl1_gotopage" name="PriceStaticControl1:gotopage" type="submit" value="Go"/></td>
</tr>
</table>
</td>
</tr>
<tr style="DISPLAY: none">
<td align="middle" width="100%"></td>
</tr>
</table>
<p><font face="宋体"></font> </p>
</td>
<td align="left" background="images/right.gif" width="5"></td>
</tr>
<tr>
<td width="5"><img src="images/scgl_106.gif"/></td>
<td style="BACKGROUND-POSITION-Y: top; BACKGROUND-IMAGE: url(images/scgl_107.gif); BACKGROUND-REPEAT: repeat-x"></td>
<td width="5"><img src="images/scgl_108.gif"/></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</form>
</body>
</html>