我有一个特别的信息,我在金融市场上寻找,不幸的是,目前的过滤器不允许我这样做。我在谷歌表单上有一个选择,我可以直接进入每一支股票,并单独检查。我可以使用importhtml,在某种程度上它也可以工作,但我想使用importXML,以防表的位置发生变化。
实例
我在这里使用的网站是《金融时报》
以下是页面源代码的片段:
<span>Sectors</span><i class="o-ft-icons-icon o-ft-icons-icon--arrow-down"></i>
<ul class="mod-ui-tab-row mod-ui-tab-row--dropdown" role="tablist">
<li aria-controls="sectors-panel" aria-selected="true" class="mod-ui-tab mod-ui-tab__module-header" role="tab">Sectors</li>
<li aria-controls="regions-panel" aria-selected="false" class="mod-ui-tab mod-ui-tab__module-header" role="tab">Regions</li>
</ul>
<div class="mod-module__content">
<div aria-hidden="false" class="mod-ui-tab-content" id="sectors-panel" role="tabpanel">
<div>
<div aria-hidden="false" class="mod-weightings__sectors">
<div class="mod-weightings__sectors__chart">
<div class="mod-weightings__sectors__chart--dynamic mod-ui-chart--dynamic"></div>
</div>
<div class="mod-weightings__sectors__table">
<table class="mod-ui-table mod-ui-table--colored">
<thead>
<tr>
<th class="mod-ui-table__header--text">Sector</th>
<th>% Net assets</th>
<th>Category average</th>
</tr>
</thead>
<tbody>
<tr>
<td class="mod-ui-table__cell--colored"><span class="mod-ui-table__cell--colored__wrapper" style="border-color:#27757B;">Technology</span></td>
<td>88.04%</td>
<td>73.78%</td>
</tr>
<tr>
<td class="mod-ui-table__cell--colored"><span class="mod-ui-table__cell--colored__wrapper" style="border-color:#EEA45F;">Financial Services</span></td>
<td>8.38%</td>
<td>3.74%</td>
</tr>
<tr>
<td class="mod-ui-table__cell--colored"><span class="mod-ui-table__cell--colored__wrapper" style="border-color:#94826B;">Industrials</span></td>
<td>2.72%</td>
<td>6.28%</td>
</tr>
<tr>
<td class="mod-ui-table__cell--colored"><span class="mod-ui-table__cell--colored__wrapper" style="border-color:#EED485;">Consumer Cyclical</span></td>
<td>0.67%</td>
<td>5.98%</td>
</tr>
<tr>
<td class="mod-ui-table__cell--colored"><span class="mod-ui-table__cell--colored__wrapper" style="border-color:#A6A371;">Healthcare</span></td>
<td>0.00%</td>
<td>2.93%</td>
</tr>
<tr>
<td class="mod-ui-table__cell--colored"><span class="mod-ui-table__cell--colored__wrapper" style="border-color:#819E9A;">Communication Services</span></td>
<td>0.00%</td>
<td>2.36%</td>
</tr>
<tr>
<td class="mod-ui-table__cell--colored"><span class="mod-ui-table__cell--colored__wrapper" style="border-color:#746E7F;">Real Estate</span></td>
<td>0.00%</td>
<td>0.17%</td>
</tr>
<tr>
<td class="mod-ui-table__cell--colored"><span class="mod-ui-table__cell--colored__wrapper" style="border-color:#73A5C3;">Consumer Defensive</span></td>
<td>0.00%</td>
<td>0.08%</td>
</tr>
</tbody>
</table>
</div>
<div class="mod-disclaimer">
As of Dec 19 2017. Sectors weighting is calculated using only long position holdings of the portfolio.
</div>
</div>
</div>
</div>
</div>
我想获得金融服务或部门表中任何名为finance的项目之后的第一个值(%)。在这种情况下,该值为8.38%