【问题标题】:Google sheet importxml xpath query谷歌表 importxml xpath 查询
【发布时间】:2019-02-27 04:12:34
【问题描述】:

我正在尝试获取此http://www.bloomberg.com/quote/1880:HK 网站的“下一个收益公告”的数据。

我试过了

=ImportXml( "http://www.bloomberg.com/quote/1880:HK", "//span[@class='company_stat']" )

=ImportXml( "http://www.bloomberg.com/quote/1880:HK", "/html/body/div[2]/div[1]/div[1]/div[2]/div[2]/div[2]/div[1]/div[1]/div[3]/table/tbody/tr[16]/td/text()" )

得到#N/A,想要10/27/2014作为结果

【问题讨论】:

    标签: xpath google-sheets


    【解决方案1】:

    不要使用脆弱、极其复杂的 XPath 表达式,尝试一个有用的表达式:

    //th[normalize-space() = 'Next Earnings Announcement']/following-sibling::td
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-05-29
      • 1970-01-01
      • 1970-01-01
      • 2018-03-28
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多