I need to scrape just the closing date on a website onto google sheets.
currently using =IMPORTXML(A1,"//*[@id]")
but it scrapes all the data on the site.
I need just the closing date right at the bottom of this page, is this possible?
or just a date:
=REGEXEXTRACT(QUERY(FLATTEN(IMPORTXML(A1, "//*[@id]")),
"where Col1 starts with 'Closing date'"), "(\d .*).")
CodePudding user response:
Try
=IMPORTXML(A1, "//p/span/span/strong/span")
or
=REGEXEXTRACT(IMPORTXML(A1, "//p/span/span/strong/span"),"Closing date (.*)\.")