看
HTML的源代码
http://www.google.com/finance/historical?cid=983582&startdate=Nov+28,+2010&num=200
我看到谷歌永远不会关闭td和tr标签.没有< / tr>没有< / td>在源头.
为什么?
<tr class=bb> <th class="bb lm">Date <th class="rgt bb">Open <th class="rgt bb">High <th class="rgt bb">Low <th class="rgt bb">Close <th class="rgt bb rm">Volume <tr> <td class="lm">Nov 26,2010 <td class="rgt">11,183.50 <td class="rgt">11,067.17 <td class="rgt">11,092.00 <td class="rgt rm">68,396,121 <tr>
难道解析它是因为XML解析器无法读取它吗?我已经注意到& output = csv不适用于索引(此网址不起作用:http://www.google.com/finance?q=INDEXDJX:.DJI&output=csv),而它可用于库存(http://www.google.com/finance/historical?q=NASDAQ:GOOG\u0026amp ; output = csv将起作用)以便在csv中获取索引的历史数据,你必须做解析工作!