我正在尝试从此网页抓取数据:http://webfund6.financialexpress.net/clients/zurichcp/PortfolioPriceTable.aspx?SchemeID=33,我特别需要基金号码26的数据。
使用此地址(资金编号1-25)从第一页获取数据没有问题,但是我的地狱无法从第二页中删除任何内容。有人可以帮忙吗?
谢谢!
以下是我使用的代码:在Google表格中:
= IMPORTXML( “http://webfund6.financialexpress.net/clients/zurichcp/PortfolioPriceTable.aspx?SchemeID=33”,“/ HTML /体/形式[@ ID = '的MainForm'] /表/ TR / TD /格[@ ID = '主'] /格[@id = 'tabResult'] /格[@ ID = '价格'] /表/ THEAD / TR [26] / TD [@类= '中心'] [1]“)
答案 0 :(得分:0)
要获取第二页,请将& PgIndex = 2添加到您的网址。然后将/ table / thead / tr [26]调整为/ table / thead / tr [2]。结果是:
=IMPORTXML("http://webfund6.financialexpress.net/clients/zurichcp/PortfolioPriceTable.aspx?SchemeID=33&PgIndex=2","/html/body/form[@id='MainForm']/table/tr/td/div[@id='main']/div[@id='tabResult']/div[@id='Prices']/table/thead/tr[2]/td[@class='Center'][1]")
答案 1 :(得分:0)