Reserach1 Reserach2
Reserach1 Reserach2

Reputation: 7

How to extract data using R?

Here is the R code:

 
output:
character(0)

Upvotes: 0

Views: 68

Answers (1)

xwhitelight
xwhitelight

Reputation: 1579

I'm not familiar with CSS Selector so I use XPath instead.

library(rvest)
url <- 'https://www.flightradar24.com/data/airlines'
airline_names <- read_html(url) %>% html_nodes(xpath = "//td[@class='notranslate']/a") %>% html_text()

Hope you can read the code to get the idea.

Upvotes: 1

Related Questions