Reputation: 19
I'm trying to harvest data from www.flightradar24.com using rvest. I've got a subscription, so I want to log in and get access to more data. This is the code I'm using to log in (I'm using my email and password instead of "email" and "password"):
library(rvest)
url0 = "https://www.flightradar24.com/"
session = html_session(url0)
form = html_form(session)[[1]]
filled_form = set_values(form, 'email'="email", 'password'="password")
session_loggedin = submit_form(session, filled_form)
I get the following message:
Submitting with '<unnamed>'
I want to check whether this is actually working, so I'm trying with this:
jump_to(session_loggedin, "https://www.flightradar24.com/account")
And this is the message I get:
<session> https://www.flightradar24.com/premium
Status: 200
Type: text/html; charset=utf-8
Size: 98649
As you can see, it's going to https://www.flightradar24.com/premium (website where you can compare the different subscriptions) instead of https://www.flightradar24.com/account (your account page once you log in).
I've tried grabbing the data from this website https://www.flightradar24.com/data/aircraft/ln-lnc using html_table, but it only captures the data included in the basic subscription, so that also implies that I'm not successfully logging in.
Any help would be very much appreciated.
Upvotes: 1
Views: 432