从现有网站检索实时数据 [英] Retrieving live data from existing websites
问题描述
[IMG] http://i57.tinypic.com/16izib9.png [/ IMG]
我需要从这里检索此表: http://uob.com.sg/personal/loans/personal-loan.html#rates-期限 [ ^ ]
我使用 https://developer.yahoo.com/ yql / [ ^ ]从上面检索数据网站。
[QUOTE] YQL查询:从html中选择*,其中url ='http://uob.com.sg/personal/loans/personal-loan。 html#rates-tenors'和xpath ='// div [@ class =nova-table-container]'[/ QUOTE]
然后我用Jsfiddle在这里显示我想要检索的表:
jsfiddle.net /嗯8akco4 / 18 [ ^ ]
问题:表格只显示为对象。
如何显示完整的表格?
编辑:我实际设法找回第一行。
http://jsfiddle.net/wsszuaw6/2/ [ ^ ]
但是因为表中有几个合并的单元格,我无法正确检索其余行。
[IMG]http://i57.tinypic.com/16izib9.png[/IMG]
I need to retrieve this table from here: http://uob.com.sg/personal/loans/personal-loan.html#rates-tenors[^]
I used https://developer.yahoo.com/yql/[^] to retrieve the data from the above website.
[QUOTE] YQL Query: select * from html where url='http://uob.com.sg/personal/loans/personal-loan.html#rates-tenors' and xpath='//div[@class="nova-table-container"]' [/QUOTE]
Then I used Jsfiddle to display the table in which I wanted to retrieve here:
jsfiddle.net/uh8akco4/18[^]
Problem: the table only shows up as an Object.
How do I display the full table?
I actually managed to retrieve the 1st row.
http://jsfiddle.net/wsszuaw6/2/[^]
But because there are several merged cells in the table I wasn't able to retrieve the rest of the rows properly.
推荐答案
将其粘贴到您的网站:
Paste this into your website :
<table width="700" border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr class="dark_blue">
<th width="25%" class="center">Loan Tenor<br>(months)</th>
<th width="25%" class="center">Processing Fee<br>(%)</th>
<th width="25%" class="center">Flat Rates<br>(% p.a.)</th>
<th width="25%" class="center">Effective Interest Rates<br>(% p.a)</th>
</tr>
<tr class="darker row-odd">
<td class="item center">12</td>
<td rowspan="3" align="center" class="item light-blue center" style="background-color:#f0f7ff; border-right:2px solid #ffffff;">1.5</td>
<td rowspan="3" class="item light-blue center" style="background-color:#f0f7ff">4.25</td>
<td class="item center">10.61</td>
</tr>
<tr>
<td class="item center">24</td>
<td class="item center">9.46</td>
</tr>
<tr class="darker row-odd">
<td class="item center">36</td>
<td class="item center">8.99</td>
</tr>
</tbody>
</table>
这篇关于从现有网站检索实时数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!