Created
March 21, 2020 07:30
-
-
Save dalmo3/e0e0e58f2d419386b0b97398da3b3898 to your computer and use it in GitHub Desktop.
scrape departure and arrival data from airportia flight page
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) | |
}}) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@lorencosta