使用 IMPORTXML 仅检索截止日期,仅此而已
Using IMPORTXML to just retrieve the closing date and nothing else
我只需要将网站上的截止日期抓取到 google 表格上。
目前正在使用 =IMPORTXML(A1,"//*[@id]")
,但它会抓取网站上的所有数据。
我只需要页面底部的截止日期,可以吗?
https://justicejobs.tal.net/vx/lang-en-GB/mobile-0/appcentre-1/brand-15/xf-5ebef95e1d21/candidate/so/pm/1/pl/3/opp/54025-202202-Prison-Officer-HMP-Leicester/en-GB
尝试:
=QUERY(FLATTEN(IMPORTXML(A1, "//*[@id]")),
"where lower(Col1) starts with 'closing date'")
或者只是一个日期:
=REGEXEXTRACT(QUERY(FLATTEN(IMPORTXML(A1, "//*[@id]")),
"where lower(Col1) starts with 'closing date'"), "(\d+.*).")
尝试
=IMPORTXML(A1, "//p/span/span/strong/span")
或
=REGEXEXTRACT(IMPORTXML(A1, "//p/span/span/strong/span"),"Closing date (.*)\.")
我只需要将网站上的截止日期抓取到 google 表格上。
目前正在使用 =IMPORTXML(A1,"//*[@id]")
,但它会抓取网站上的所有数据。
我只需要页面底部的截止日期,可以吗? https://justicejobs.tal.net/vx/lang-en-GB/mobile-0/appcentre-1/brand-15/xf-5ebef95e1d21/candidate/so/pm/1/pl/3/opp/54025-202202-Prison-Officer-HMP-Leicester/en-GB
尝试:
=QUERY(FLATTEN(IMPORTXML(A1, "//*[@id]")),
"where lower(Col1) starts with 'closing date'")
或者只是一个日期:
=REGEXEXTRACT(QUERY(FLATTEN(IMPORTXML(A1, "//*[@id]")),
"where lower(Col1) starts with 'closing date'"), "(\d+.*).")
尝试
=IMPORTXML(A1, "//p/span/span/strong/span")
或
=REGEXEXTRACT(IMPORTXML(A1, "//p/span/span/strong/span"),"Closing date (.*)\.")