Google表格中的ImportXML XPath URL

ImportXML XPath URL in Google Sheets

我刚刚开始使用Google表格,不知道是否可以使用importxml XPath

获取链接

https://prnt.sc/orrxpv

0

在此屏幕截图中,您可以看到主锦标赛子菜单下的可点击链接,该链接每周都会更改。当前,我每周手动复制粘贴,您可以在下面链接的工作表的a16单元格中找到它

https://prnt.sc/orrx4y

enter

1
2
3
https://www.tennisexplorer.com/cincinnati/2019/atp-men/
https://www.tennisexplorer.com/cincinnati/2018/atp-men/
https://www.tennisexplorer.com/cincinnati/2017/atp-men/

我想更改链接之间的年份,但无法弄清楚:(

链接到具有编辑权限的工作表:)
https://docs.google.com/spreadsheets/d/16Y6q2tw26c-nbmqIrXiQ_ZhuDc48oAzkXvOl78kVy00/edit?usp=sharing


要在链接使用中创建可选择的年份:

1
="https://www.tennisexplorer.com/cincinnati/"&B1&"/atp-men/"

0

您可以进行电影电影:

1
2
3
=ARRAYFORMULA(QUERY(TO_TEXT(IMPORTXML(
"https://www.tennisexplorer.com/cincinnati/2019/atp-men/",
"//td[@class='t-name']")),"select Col2 where Col1 is null limit 1", 0))

,则整个公式为:

1
2
3
4
="https://www.tennisexplorer.com/"&
 ARRAYFORMULA(QUERY(TO_TEXT(IMPORTXML(
"https://www.tennisexplorer.com/live/",
"//td[@class='t-name']")),"select Col2 where Col1 is null limit 1", 0))&"/"&B1&"/atp-men/"

0