'Targeting a meta tag and its values with XPath in Google Sheets to follow flight data

I have an event coming up where we have passengers coming in from 25-30 different flights for a week and I want to have the live data when it comes to their actual arrival time. I have their info lined up in a google sheets document and I want to extract the true arrival time from plane mapper.com or Schiphol.com. I've tried using https://www.planemapper.com/flights/AT850 as an example and tried to extract the data using =IMPORTXML(E88,"//meta[@itemprop='arrivaltime'][1]/@content") I have haven't had much luck however. Any help would be greatly appreciated. Another (free/low cost) solution would be great as well.

Thanks,

Bas



Solution 1:[1]

Try this

=index(regexextract(substitute(textjoin("",,importxml(url,"//script")),char(10),""),"Arrival.*(\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}).*(\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2})"),1)

it's a bit complex because you have to fetch data from the content of the script.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Mike Steelson