Skip to content

Instantly share code, notes, and snippets.

@dalmo3
Created March 21, 2020 07:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dalmo3/e0e0e58f2d419386b0b97398da3b3898 to your computer and use it in GitHub Desktop.
Save dalmo3/e0e0e58f2d419386b0b97398da3b3898 to your computer and use it in GitHub Desktop.
scrape departure and arrival data from airportia flight page
document.querySelectorAll('.flightInfo-schedule').forEach(s =>{
let f = s.querySelector('.flightInfo-date');
s.querySelectorAll('.flightInfo-dateItem').forEach(d=>{
let l = d.querySelector('.flightInfo-dateLabel');
if (l && l.innerText === 'Actual:') {
let t = d.querySelector('.flightInfo-dateTime');
console.log(f.innerText, t.innerText)
}})
})
@dalmo3
Copy link
Author

dalmo3 commented Mar 21, 2020

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment